/* The invitation's ornate frame and its label share the card's actual centre. */
.right-column .character-invitation .invitation-action.action {
  position:relative; left:50%; right:auto; display:flex; align-items:center;
  justify-content:center; width:100%; max-width:270px; min-width:0;
  margin:16px 0 0; padding:0 30px; box-sizing:border-box;
  text-align:center; transform:translateX(-50%);
}
.right-column .character-invitation .invitation-action.action:hover {
  transform:translate(-50%,-1px);
}

/* Phone layouts: every field remains available in one vertical reading flow. */
@media (max-width:600px) {
  .site-wrap { width:100%; max-width:100%; padding-inline:10px; box-sizing:border-box; }
  .site-grid, .site-grid.wide-content { display:flex; flex-direction:column; gap:18px; min-width:0; }
  .site-grid>#viewport { order:0; width:100%; min-width:0; box-sizing:border-box; }
  .site-grid>.left-column { display:grid; order:1; grid-template-columns:minmax(0,1fr); gap:12px; width:min(100%,340px); min-width:0; margin-inline:auto; }
  .site-grid:not(.wide-content)>.right-column { display:grid; order:2; grid-template-columns:minmax(0,1fr); gap:12px; width:min(100%,340px); min-width:0; margin-inline:auto; }
  .site-grid.wide-content>.right-column { display:none; }
  .wide-content #viewport { padding:18px 12px; border-radius:12px; }
  #viewport>section, #viewport>div, .left-column>*, .right-column>* { min-width:0; max-width:100%; box-sizing:border-box; }
  #viewport :is(h1,h2,h3,p,.page-trail,.page-intro,.content-note,.mini-note) { overflow-wrap:anywhere; }
  #viewport :is(.page-intro,.content-note,.mini-note,.page-trail) { font-size:14px; line-height:1.7; }
  #viewport :is(.page-heading,.page-title) { font-size:24px; letter-spacing:1px; }
  :is(.section-title,.page-heading-row,.commerce-list-heading) { min-width:0; gap:10px; flex-wrap:wrap; }
  .section-title h2 { font-size:21px; }
  .page-trail { flex-wrap:wrap; }
  .utility { height:auto; min-height:44px; padding:7px; flex-wrap:wrap; gap:7px; }
  .utility .wordmark { max-width:100%; flex:0 1 auto; font-size:11px; }
  .utility #utility-account { min-width:0; flex-wrap:wrap; gap:5px; margin-left:auto; }
  .utility button { min-height:32px; padding:5px 8px; font-size:14px; }
  .utility #utility-account button:nth-child(3) { display:inline-flex; }
  .utility-tag { display:none; }
  .masthead .hero-brand, .masthead .hero-brand:hover, .masthead .hero-brand:focus-visible { top:12px; left:14px; right:auto; bottom:auto; width:165px; max-width:calc(100% - 28px); height:auto; }
  .masthead .hero-brand>img { display:block; width:100%; height:auto; }
  .masthead .hero-brand>span { display:block; width:max-content; max-width:calc(100vw - 56px); margin:5px 0 0!important; font-size:11.5px; line-height:1.5; letter-spacing:.3px; white-space:nowrap; }
  /* Use the full banner width for the cast; the launch seal sits beside the logo. */
  .hero-four .hero-quartet { inset:auto; top:var(--mobile-cast-top,96px); right:4px; left:auto; bottom:auto; width:1000px; height:340px; transform:scale(var(--mobile-cast-scale,.3)); transform-origin:top right; }
  .hero-four .hero-quartet>figure { top:0; right:auto; bottom:auto; width:290px; height:340px; margin:0; }
  .hero-four .hero-quartet>.hero-swordswoman { left:0; }
  .hero-four .hero-quartet>.hero-demon { left:235px; }
  .hero-four .hero-quartet>.hero-archer { left:470px; }
  .hero-four .hero-quartet>.hero-mage { left:710px; }
  .hero-four .hero-quartet>figure>img { display:block; width:100%; height:100%; max-width:none; max-height:none; object-fit:contain; object-position:center bottom; }
  .hero-four .original-motion { top:var(--classic-movie-top,var(--mobile-movie-top,70px))!important; right:4px!important; left:auto!important; bottom:auto!important; width:var(--classic-movie-width,var(--mobile-movie-width,min(434px,125%)))!important; height:var(--classic-movie-height,var(--mobile-movie-height,130px))!important; max-width:none; aspect-ratio:auto; transform:none!important; }
  .hero-four .original-motion>ruffle-player { display:block; width:100%!important; height:100%!important; }
  .hero-four .game-start, .hero-four .game-start:hover { top:12px; right:10px; left:auto; bottom:auto; transform:scale(.34); transform-origin:top right; }
  .hero-four .hero-scene-controls { top:auto; right:10px; bottom:94px; height:18px; gap:1px; padding:0 5px; box-sizing:border-box; }
  .hero-four .hero-scene-controls button { width:21px; height:16px; }
  .hero-four .hero-scene-controls i { width:4px; height:4px; }
  .hero-four .quartet-arrival { inset:auto; top:var(--mobile-cast-top,96px); right:4px; left:auto; bottom:auto; width:calc(100% - 8px); height:calc(340px * var(--mobile-cast-scale,.3)); overflow:hidden; }
  .hero-nav { min-width:0; gap:4px; }
  .hero-nav>a, .hero-nav>.adventure-menu>.adventure-trigger { min-width:0; padding:4px; gap:4px; justify-content:center; }
  .hero-nav>a>img, .hero-nav .adventure-trigger>img { width:24px; height:24px; flex:0 0 24px; }
  .hero-nav>a>span, .hero-nav .adventure-trigger>span { min-width:0; font-size:14px; line-height:1.3; white-space:normal; overflow-wrap:anywhere; }
  .adventure-menu .adventure-nav { width:174px; max-width:calc(100vw - 26px); }
  .adventure-menu .adventure-nav a { font-size:14px; min-height:39px; }
  .adventure-menu .adventure-nav[hidden] { display:none; }
  .site-footer { min-width:0; flex-wrap:wrap; justify-content:center; text-align:center; }
  .site-footer nav { display:flex; flex-wrap:wrap; justify-content:center; font-size:14px; }
  .site-footer p, .site-footer small { font-size:12px; overflow-wrap:anywhere; }

  /* Cards and secondary columns stay in the page instead of disappearing. */
  .side-section { width:100%; min-width:0; }
  .side-section h2 { font-size:17px; }
  .side-section h2 small { display:block; font-size:12px; }
  .side-section :is(a,p,button,.role-job) { font-size:14px; }
  .side-section.guide>a { min-height:43px; }
  .side-section.guide>a>em { font-size:14px; }
  .quick-banners { grid-template-columns:minmax(0,1fr); }
  .quick-banners>a { min-width:0; }
  .quick-banners b { font-size:16px; }
  .quick-banners small { font-size:12px; }
  .side-section :is(.action,.ornate-button) { max-width:100%; box-sizing:border-box; }
  .side-section .wallet { max-width:100%; }
  .character-invitation { min-height:270px; padding:20px 18px; }
  .character-invitation .action { width:100%; max-width:270px; margin-inline:auto; }
  .home-discover, .home-ranking, .news-section { padding:20px 14px; }
  .discover-grid, .feature-copy, .home-promos, .home-quick-links, .two-columns, .settings-grid, .cart-layout, .character-layout { grid-template-columns:minmax(0,1fr); min-width:0; }
  .discover-grid>* { min-width:0; }
  .home-promos>a { padding:16px 12px; min-width:0; }
  .home-promos b { font-size:17px; }
  .home-promos span { font-size:14px; }
  .home-promos small { font-size:12px; }
  .home-promos img { width:auto; height:auto; object-fit:contain; }
  .ranking-preview { min-width:0; }
  .ranking-preview li { min-width:0; }
  .ranking-preview :is(b,strong,span) { overflow-wrap:anywhere; }
  .article-body { font-size:15px; line-height:1.8; overflow-wrap:anywhere; }
  .article-body img, .support-original-poster { max-width:100%; height:auto; }

  /* Full rankings become labelled cards, including each expanded family member. */
  .rank-controls, .rank-controls .tabs { min-width:0; flex-wrap:wrap; gap:8px; }
  .rank-controls input { width:100%; min-width:0; font-size:16px; box-sizing:border-box; }
  .rank-controls .tabs button { min-height:40px; padding:8px 12px; font-size:14px; }
  .rank-table-wrap { width:100%; min-width:0; overflow:visible; padding:10px; box-sizing:border-box; }
  .rank-table-wrap table, .rank-table-wrap .mobile-data-table { width:100%!important; min-width:0!important; max-width:100%; table-layout:fixed; }
  .mobile-data-table { display:block; position:relative; border:0; }
  .mobile-data-table>colgroup { display:none; }
  .mobile-data-table>thead { position:absolute!important; width:1px!important; height:1px!important; margin:-1px!important; padding:0!important; overflow:hidden!important; clip-path:inset(50%); white-space:nowrap; border:0!important; }
  .mobile-data-table>tbody { display:block; width:100%; min-width:0; }
  .rank-table-wrap .mobile-data-table>tbody>tr:not(.family-roster) { display:block; width:100%; margin:0 0 12px; padding:6px 10px; box-sizing:border-box; border:1px solid #bac9a94d; border-radius:9px; background:#153f323d; }
  .rank-table-wrap .mobile-data-table>tbody>tr:not(.family-roster):hover { background:#a8bc8a15!important; }
  .rank-table-wrap .mobile-data-table>tbody>tr>td:not([data-mobile-span]) { display:grid; grid-template-columns:minmax(76px,30%) minmax(0,1fr); align-items:center; gap:10px; width:100%; min-width:0; padding:10px 0; box-sizing:border-box; border:0; border-bottom:1px solid #c2d3b52b; text-align:center!important; font-family:var(--ft-font-ui); font-size:14px; line-height:1.6; color:#f0ead2; }
  .rank-table-wrap .mobile-data-table>tbody>tr>td:not([data-mobile-span]):last-child { border-bottom:0; }
  .mobile-data-table td[data-mobile-label]::before { content:attr(data-mobile-label); display:block; min-width:0; color:#d9d8b7; font-size:14px; line-height:1.6; text-align:left; font-weight:500; overflow-wrap:anywhere; }
  .rank-table-wrap .rank-cell-value { min-width:0; width:100%; max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:center; }
  .rank-table-wrap .rank-name { display:flex; min-width:0; width:100%; gap:8px; align-items:center; justify-content:center; text-align:left; }
  .rank-table-wrap .rank-name img { position:static; width:30px; height:30px; flex:0 0 30px; margin:0; transform:none; }
  .rank-table-wrap .rank-person-label { min-width:0; font-size:14px; white-space:normal; overflow-wrap:anywhere; }
  .rank-table-wrap .family-name { min-width:0; padding:0 17px; white-space:normal; overflow-wrap:anywhere; text-align:center; }
  .rank-table-wrap .family-header { cursor:pointer; }
  .rank-table-wrap .mobile-data-table>tbody>.family-roster { display:block; width:100%; margin:0 0 16px; padding:0; background:transparent!important; }
  .rank-table-wrap .mobile-data-table>tbody>.family-roster[hidden] { display:none; }
  .rank-table-wrap .family-roster>td[data-mobile-span] { display:block; width:100%; min-width:0; padding:0 0 0 6px!important; box-sizing:border-box; border:0; background:transparent!important; }
  .rank-table-wrap .family-roster>td>div { width:100%; min-width:0; padding:0!important; box-sizing:border-box; overflow:visible; }
  .mobile-data-table td[data-mobile-span]::before { display:none; }
  .rank-table-wrap .family-members-table>tbody>tr { border-left:2px solid #b7b77775!important; }

  /* Character preview and appearance choices. */
  .character-layout { display:grid; gap:16px; }
  #role-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; min-width:0; }
  .role-card { width:100%; height:auto; min-height:192px; min-width:0; padding:18px 8px!important; box-sizing:border-box; }
  .role-card .card-portrait { width:66px; height:66px; }
  .role-name { font-size:15px!important; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
  .role-job, .role-level { font-size:14px!important; }
  .profile, .profile.has-appearance-studio { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; gap:16px; padding:20px 14px; min-width:0; }
  .profile>.profile-heading { grid-column:1!important; grid-row:1!important; min-width:0; }
  .profile>.profile-model-stage { grid-column:1!important; grid-row:2!important; width:100%; height:auto; min-width:0; justify-self:center; }
  .profile>.stats { grid-column:1!important; grid-row:3!important; width:100%; min-width:0; margin:0; box-sizing:border-box; }
  .profile-heading h2 { font-size:21px!important; line-height:1.5; }
  .profile-heading p { font-size:14px!important; }
  .model-circle { width:min(190px,100%); height:auto; aspect-ratio:1; margin-inline:auto; box-sizing:border-box; }
  .model-profession, .model-gender button { font-size:14px; }
  .profile .stats>div { display:grid; grid-template-columns:minmax(0,1fr); padding:12px 0; gap:4px; }
  .profile .stats dt { display:flex; justify-content:center; align-items:center; gap:8px; margin:0; font-size:14px; line-height:1.6; }
  .profile .stats dt .stat-icon { position:static; width:18px; height:18px; flex:0 0 18px; transform:none; }
  .profile .stats dd { margin:0; font-size:21px!important; line-height:1.5; text-align:center; overflow-wrap:anywhere; }
  #character-update-rule, .rank-update-rule { font-size:13px; text-align:center; }
  .appearance-studio, .appearance-controls, .appearance-row, .appearance-basics { min-width:0; max-width:100%; box-sizing:border-box; }
  .appearance-heading { padding-inline:16px; }
  .appearance-heading h3 { font-size:16px; }
  .appearance-studio .appearance-basics { grid-template-columns:minmax(0,1fr); gap:12px; }
  .appearance-studio .appearance-row>h3, .appearance-color-panel>h3 { font-size:14px; }
  .appearance-choice-list { max-width:100%; flex-wrap:wrap; }
  .appearance-studio .appearance-choice { font-size:14px; }
  .appearance-toolbar { flex-wrap:wrap; }
  .appearance-reset, .appearance-status { font-size:14px; }
  .appearance-controls>.appearance-toolbar { padding-inline:10px; }

  /* Centered commerce title with a separate, crisp pair of characters. */
  .commerce-heading.original-glass { display:flex; flex-direction:column; align-items:center; min-height:0; padding:22px 14px 12px; margin-bottom:16px; text-align:center; }
  .commerce-heading.original-glass>span { font-size:11px; letter-spacing:1.3px; }
  .commerce-heading.original-glass h1 { max-width:100%; padding:0 20px; font-size:26px; line-height:1.5; letter-spacing:1px; }
  .commerce-heading.original-glass p { max-width:100%; margin-bottom:0; font-size:14px; }
  .commerce-heading.original-glass>.commerce-heading-art { position:relative; inset:auto; width:100%; height:116px; min-height:116px; margin-top:8px; padding:0 10px; box-sizing:border-box; --cast-visible-size:108px; justify-content:space-between; overflow:visible; }
  .commerce-heading-art>.commerce-cast { flex:0 0 100px; width:100px; height:116px; }
  .mall-view-tabs, .mall-controls, .mall-controls nav { min-width:0; flex-wrap:wrap; gap:8px; }
  .mall-view-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mall-view-tabs button { min-width:0; padding:10px 8px; font-size:14px; }
  .mall-recipient-bar, .recipient-picker-wrap { min-width:0; max-width:100%; width:100%; box-sizing:border-box; }
  .recipient-picker { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
  .recipient-picker, .recipient-picker-name, .recipient-option { font-size:15px!important; }
  .recipient-popover { width:100%; max-width:100%; min-width:0; box-sizing:border-box; grid-template-columns:minmax(0,1fr); padding:10px; }
  .recipient-option { min-width:0; min-height:48px; white-space:normal; }
  .recipient-option>span { min-width:0; overflow-wrap:anywhere; }
  .recipient-option small { font-size:13px; }
  .recipient-popover[hidden] { display:none; }
  .mall-controls input { min-width:0; width:100%; font-size:16px; min-height:43px; box-sizing:border-box; }
  .mall-controls nav button { min-height:39px; font-size:14px; }
  .mall-grid { grid-template-columns:minmax(0,1fr); gap:12px; min-width:0; }
  .mall-item { min-width:0; padding:18px 14px; }
  .compact-product-heading { gap:12px; }
  .compact-product-heading>div { min-width:0; }
  .mall-art, .mall-art img { width:48px; height:48px; flex:0 0 48px; }
  .mall-item h2 { font-size:17px!important; line-height:1.5; }
  .mall-category, .product-caption { font-size:14px!important; line-height:1.7; }
  .compact-product-bottom { min-width:0; flex-wrap:wrap; gap:8px; }
  .compact-product-bottom>.v-price, .compact-product-bottom>small { font-size:16px; }
  .mall-add-button { min-height:36px; padding:6px 12px; font-size:14px!important; margin-left:auto; }
  .mall-add-button .add-plus { flex-shrink:0; }
  .cart-layout { display:grid; gap:18px; }
  .cart-layout>* { min-width:0; width:100%; box-sizing:border-box; }
  .cart-line { display:grid; grid-template-columns:48px minmax(0,1fr); align-items:start; gap:10px; min-width:0; padding:18px 0; }
  .cart-line>img { width:48px; height:48px; object-fit:contain; }
  .cart-line-body { min-width:0; }
  .cart-line-body h2 { font-size:17px!important; }
  .cart-item-meta { flex-wrap:wrap; gap:6px; font-size:14px; }
  .cart-item-meta>small, .cart-line-body>small { font-size:14px; }
  .cart-line>.v-price { grid-column:2; justify-self:end; font-size:18px!important; }
  .cart-quantity { flex-wrap:wrap; gap:8px; }
  .cart-quantity>button:not(.cart-remove) { width:34px; height:34px; min-width:34px; }
  .cart-quantity>span { min-width:24px; font-size:16px; }
  .cart-quantity>.cart-remove { font-size:14px; min-height:34px; }
  .cart-summary { min-width:0; padding:22px 16px; }
  .cart-summary h2 { text-align:center; font-size:23px; }
  .cart-summary dl>div, .cart-total { min-width:0; flex-wrap:wrap; gap:8px; }
  .cart-summary dt, .cart-summary dd { margin:0; font-size:14px; }
  .cart-summary .action { width:100%; max-width:100%; min-width:0; box-sizing:border-box; }
  .cart-delivery-note { font-size:14px; overflow-wrap:anywhere; }

  /* Fit the complete wheel and companion inside the phone's actual content box. */
  .designed-fortune { display:grid; grid-template-columns:minmax(0,1fr); gap:18px; min-width:0; }
  .fortune-stage, .fortune-details { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
  .fortune-stage { padding:20px 10px; }
  .fortune-title h1 { font-size:27px; letter-spacing:1px; }
  .fortune-title>small { font-size:11px; letter-spacing:1px; }
  .fortune-stage .recipient-picker-wrap { width:100%; margin:15px auto 8px; }
  .mechanical-stage { width:100%!important; max-width:100%!important; box-sizing:border-box; padding:38px 8px 15px!important; margin-inline:auto; }
  .mechanical-core { width:100%!important; max-width:100%!important; min-width:0; margin-inline:auto; box-sizing:border-box; }
  .wheel-frame { width:100%; max-width:100%; box-sizing:border-box; }
  .mechanical-companion { left:0!important; bottom:0; width:82px; max-width:30%; height:auto; }
  .mechanical-companion img { width:100%; height:auto; }
  .fortune-draw-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .fortune-draw-buttons>div { min-width:0; }
  .fortune-draw-buttons .action { width:100%; min-width:0; max-width:100%; box-sizing:border-box; font-size:16px; padding-inline:16px; }
  .draw-cost { flex-wrap:wrap; min-height:40px; column-gap:4px; row-gap:0; }
  .draw-cost, .draw-cost>.draw-count, .draw-cost>.v-price, .draw-cost .currency-amount { font-size:16px; }
  .draw-cost .v-price>img { width:25px; height:25px; flex-basis:25px; }
  .fortune-details { display:flex; flex-direction:column; margin:0; gap:18px; }
  .fortune-details>* { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
  .ordinary-prize-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
  .ordinary-prize-grid>* { min-width:0; }
  .fortune-details :is(h2,h3), .own-results h2 { font-size:21px; }
  .prize-card, .winner-feed-panel, .pity-panel, .own-results { min-width:0; max-width:100%; box-sizing:border-box; padding-inline:14px; }
  .pity-milestones, .pity-blocks { min-width:0; width:100%; gap:3px; }
  .pity-milestones>*, .pity-blocks>* { min-width:0; flex:1 1 0; }
  .pity-panel-heading { flex-wrap:wrap; justify-content:center; gap:8px; }
  .pity-panel-heading b, .pity-panel-heading span { font-size:16px; }
  .winner-list, .winner-feed-window, .own-result-window, .auto-result-window { width:100%; min-width:0; max-width:100%; box-sizing:border-box; overflow-y:auto; }
  .winner-list li, .winner-entry, .own-result-window li, .auto-result-window li { min-width:0; gap:8px; font-size:14px; }
  .winner-list li>div, .winner-entry>div { min-width:0; }
  .winner-list small, .winner-entry small { font-size:13px; overflow-wrap:anywhere; }
  .own-result-window li>span, .auto-result-window li>span { min-width:0; white-space:normal; overflow-wrap:anywhere; }

  /* Remaining destinations. */
  .two-columns, .settings-grid { display:grid; gap:16px; }
  .two-columns>*, .settings-grid>*, .download-card, .download-steps { min-width:0; max-width:100%; box-sizing:border-box; }
  .download-card, .download-steps { padding:22px 16px; }
  .download-card .action { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
  .download-title { font-size:23px; }
  .download-steps h3 { font-size:17px; }
  .download-steps p, .download-card p { font-size:15px; }
  .character-models { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; }
  .character-models img { width:100px; height:150px; max-width:45%; object-fit:contain; }
  .settings-grid .panel { padding:22px 16px; }
  .settings-grid .panel h2 { font-size:21px; }
  .settings-grid .panel p, .settings-grid .panel button { font-size:15px; }
  .settings-grid input { min-width:0; max-width:100%; font-size:16px; box-sizing:border-box; }
  .recharge-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .recharge-option { min-width:0; min-height:126px; padding:18px 8px; box-sizing:border-box; }
  .recharge-amount { display:inline-flex; align-items:center; justify-content:center; gap:5px; max-width:100%; }
  .recharge-amount>img { position:static; display:block; width:24px; height:24px; flex:0 0 24px; transform:none; }
  .recharge-amount>span { font-size:21px; }
  .recharge-option small { font-size:14px; }
  .support-welcome { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; min-height:0; padding:25px 14px 14px; gap:12px; text-align:center; }
  .support-welcome>div:first-child { width:100%; max-width:100%; }
  .support-welcome h1 { font-size:26px; line-height:1.6; }
  .support-welcome p { font-size:15px; }
  .support-welcome .support-cast { position:relative; inset:auto; display:flex; align-items:flex-end; justify-content:space-around; width:100%; height:176px; padding:0; }
  .support-welcome .support-cast img, .support-welcome .support-cast img:nth-child(2) { width:45%; max-width:140px; height:176px; margin:0; object-fit:contain; }
  .support-copy { padding:24px 16px; min-width:0; text-align:center; }
  .support-copy h2 { font-size:21px; }
  .support-copy p { font-size:15px; line-height:1.8; }
  .support-copy .action { width:100%; max-width:100%; min-width:0; box-sizing:border-box; margin-inline:auto; }

  /* Native modal remains inside the visual viewport, with one vertical scroller. */
  dialog.dialog, dialog.dialog.avatar-dialog { width:calc(100vw - 20px); max-width:calc(100vw - 20px); max-height:calc(100dvh - 24px); padding:28px 14px 18px; box-sizing:border-box; margin:auto; }
  .dialog .dialog-scroll, .dialog[data-kind=account] .dialog-scroll, .dialog[data-kind=rewards] .dialog-scroll { width:100%; max-width:100%; max-height:calc(100dvh - 72px); padding:0 3px; box-sizing:border-box; overflow-y:auto; overscroll-behavior:contain; }
  .dialog .dialog-content { min-width:0; padding:0 2px 12px; box-sizing:border-box; overflow-wrap:anywhere; }
  .dialog.original-glass[data-kind=account] { width:min(380px,calc(100vw - 24px)); max-height:min(620px,calc(100dvh - 24px)); padding:22px 18px 18px; box-sizing:border-box; }
  .dialog.original-glass[data-kind=account] .dialog-scroll { max-height:min(580px,calc(100dvh - 64px)); }
  .dialog .dialog-heading { min-width:0; padding:10px 6px 16px; }
  .dialog .dialog-heading h2 { font-size:23px; }
  .dialog .dialog-heading>small { font-size:11px; letter-spacing:1px; }
  .dialog-close { width:32px; height:32px; right:28px; top:15px; display:grid; place-items:center; padding:0; line-height:1; font-size:24px; }
  .dialog[data-kind=account] .auth-heading { min-height:179px; padding:69px 50px 10px; margin:0 0 12px; box-sizing:border-box; }
  .dialog .auth-heading .brand { width:185px; max-width:85%; height:62px; top:0; }
  .dialog .auth-heading .angel, .dialog .auth-heading .devil { top:78px; width:60px; height:92px; }
  .dialog .auth-heading .angel { left:-3px; }
  .dialog .auth-heading .devil { right:-3px; }
  .dialog .auth-heading h2 { margin:10px -7px 7px; font-size:21px; letter-spacing:0; line-height:1.5; }
  .dialog[data-kind=account] .auth-heading p { margin:0 -4px; font-size:12px; line-height:1.6; }
  .auth-form, .auth-form label { min-width:0; gap:8px; }
  .auth-form label, .item-recipient-label { font-size:14px; }
  .auth-form input, .auth-form select, .item-recipient-label select, .dialog input, .dialog select, .dialog textarea { width:100%; min-width:0; max-width:100%; min-height:44px; font-size:16px; box-sizing:border-box; }
  .auth-form .content-note, .auth-form .message, .dialog .dialog-note { font-size:14px; }
  .auth-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .auth-tabs button { min-width:0; min-height:40px; font-size:14px; }
  .auth-links { flex-wrap:wrap; justify-content:center; gap:12px; }
  .auth-links button { min-height:36px; font-size:14px; }
  .auth-challenge { min-width:0; max-width:100%; flex-wrap:wrap; }
  .auth-challenge>* { min-width:0; max-width:100%; }
  .dialog-actions { flex-wrap:wrap; gap:10px; }
  .dialog-actions>* { flex:1 1 100%; max-width:100%; box-sizing:border-box; }
  .dialog .action { min-width:0; max-width:100%; box-sizing:border-box; font-size:16px; }
  .dialog-item-image { max-width:100%; box-sizing:border-box; }
  .item-detail-facts { grid-template-columns:repeat(2,minmax(0,1fr)); min-width:0; }
  .item-detail-facts>div { min-width:0; }
  .order-recipient { min-width:0; padding:12px; gap:10px; }
  .order-recipient>div { min-width:0; }
  .order-recipient strong { font-size:18px; overflow-wrap:anywhere; }
  .order-recipient small, .order-recipient span { font-size:14px; }
  .dialog-summary>div { gap:10px; font-size:14px; flex-wrap:wrap; }
  .dialog-summary dt, .dialog-summary dd { min-width:0; }
  .avatar-options { grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; min-width:0; }
  .avatar-option { min-width:0; width:100%; box-sizing:border-box; padding:4px; }
  .avatar-option img { max-width:100%; }
  .dialog-signature { min-width:0; padding-inline:4px; font-size:12px; }
  .dialog-signature span { flex:1 1 20px; min-width:0; max-width:45px; }
}

/* Compact secondary cards on phones; the desktop composition is unchanged. */
@media (max-width:600px) {
  .side-section>h2 { min-height:0; padding:13px 16px 11px; font-size:16px; line-height:1.5; text-align:center; }
  .side-section h2 small { margin:3px 0 0; font-size:11px; line-height:1.4; text-align:center; }
  .side-section :is(.action,.ornate-button) { --action-art-height:39px; min-height:39px; font-size:14px; text-align:center; }
  .account-box #member-box { padding:14px 16px 16px; text-align:center; }
  .account-box #member-box>.member-role-info { margin:5px 0 8px; }
  .account-box .member-portrait { width:64px; height:64px; }
  .account-box .wallet.original-glass { min-height:58px; padding:9px 10px; margin:8px 0 12px; }
  .account-box .wallet img { width:32px; height:32px; flex-basis:32px; object-fit:contain; }
  .account-box .wallet b { font-size:26px; }
  .quick-banners { gap:7px; }
  .quick-banners>a { align-items:center; min-height:60px; height:auto; padding:10px 48px; box-sizing:border-box; text-align:center; }
  .quick-banners b { width:100%; font-size:15px; line-height:1.5; text-align:center; }
  .quick-banners small { font-size:10px; line-height:1.5; text-align:center; letter-spacing:1.2px; }
  .quick-banners>a>img { right:8px; bottom:50%; width:38px; height:38px; object-fit:contain; transform:translateY(50%); }
  .quick-banners>a:hover>img { transform:translateY(50%); }
  .side-section.guide { min-height:0; padding-bottom:12px; }
  .side-section.guide>a { display:grid; grid-template-columns:24px minmax(0,1fr) 24px; align-items:center; gap:7px; min-height:38px; margin:7px 12px 0; padding:5px 7px; box-sizing:border-box; font-size:14px; line-height:1.5; white-space:normal; text-align:center; }
  .side-section.guide>a:last-of-type { margin-bottom:0; }
  .side-section.guide>a>em { justify-self:center; width:22px; height:22px; margin:0; font-size:13px; }
  .side-section.guide .link-arrow { justify-self:center; margin:0; width:22px; height:22px; }
  .side-section.community { padding-bottom:13px; }
  .community p { margin:11px 16px; font-size:14px; line-height:1.6; text-align:center; }
  .community .discord { min-height:39px; margin:0 16px; padding:6px 10px; font-size:15px; line-height:1.5; justify-content:center; box-sizing:border-box; }
  .community .discord-mark { width:23px; height:23px; flex-basis:23px; }
  .side-section.quicklinks-box { min-height:0; padding-bottom:10px; }
  .quicklinks-box .text-links { padding:2px 13px 0; }
  .quicklinks-box .text-links>a { min-height:42px; padding:8px 34px; font-size:14px; line-height:1.6; text-align:center; box-sizing:border-box; }
  .quicklinks-box .quick-avatar { width:26px; height:26px; }
  .quicklinks-box .link-arrow { width:22px; height:22px; }
  .shop-picks #shop-picks { padding:2px 13px 0; }
  .shop-picks #shop-picks>a { grid-template-columns:34px minmax(0,1fr) 24px; gap:8px; padding:10px 3px; }
  .shop-picks .pick-copy { font-size:14px; text-align:center; }
  .shop-picks .pick-copy small { font-size:13px; text-align:center; }
  .shop-picks .link-arrow { width:23px; height:23px; }
  .shop-picks>.more-link.action { min-height:39px; margin-top:9px; margin-bottom:13px; padding-inline:30px; font-size:14px; }
  .right-column .character-invitation.side-section { min-height:0; padding:18px 16px 16px; }
  .character-invitation .invitation-kicker { margin-bottom:6px; font-size:10px; line-height:1.5; }
  .character-invitation .invitation-title { font-size:18px; line-height:1.5; text-align:center; }
  .character-invitation .invitation-title>br, .character-invitation .invitation-copy p>br { display:none; }
  .character-invitation .invitation-copy p { margin:8px 0; font-size:14px; line-height:1.6; text-align:center; }
  .character-invitation .invitation-topics { margin-top:8px; gap:7px; }
  .character-invitation .invitation-topics span { min-height:21px; padding:2px 8px; font-size:12px; }
  .right-column .character-invitation .invitation-action.action { --action-art-height:39px; width:100%; max-width:264px; min-height:39px; margin-top:12px; padding-inline:30px; font-size:14px; }
  .right-column .character-invitation .invitation-cast { top:12px; height:150px; }
  .right-column .character-invitation .invitation-cast img { height:150px; object-fit:contain; }
  .right-column .support-banner.original-glass { min-height:0; padding:18px 16px; text-align:center; }
  .right-column .support-banner>strong { width:100%; max-width:none; margin-inline:auto; text-align:center; }
  .right-column .support-banner>.support-mini-kicker { text-align:center; }
  .right-column .support-banner .support-mini-link.action { display:flex; position:relative; left:auto; right:auto; bottom:auto; align-items:center; justify-content:center; width:min(100%,264px); min-height:39px; margin:14px auto 0; padding-inline:31px; box-sizing:border-box; text-align:center; }
  .right-column .support-banner>img { top:20px; bottom:auto; right:12px; width:65px; height:96px; object-fit:contain; }
  .home-promos { width:min(100%,330px); margin-inline:auto; gap:12px; }
  .home-promos>article { grid-template-columns:88px minmax(0,1fr); gap:10px 12px; min-height:0; padding:16px; text-align:center; }
  .home-promos>article>div { min-height:0; text-align:center; }
  .home-promos small { font-size:10px; line-height:1.5; letter-spacing:1px; }
  .home-promos b { display:block; margin:4px 0; font-size:16px; line-height:1.5; text-align:center; }
  .home-promos p { margin-top:5px; font-size:13px; line-height:1.6; text-align:center; }
  .home-promos .promo-model { --promo-size:86px; width:88px; height:100px; }
  .home-promos .promo-model>img { width:calc(var(--promo-size)*var(--promo-w)); height:auto; max-width:none; max-height:none; aspect-ratio:auto; object-fit:contain; }
  .home-promos>article>.action { --action-art-height:39px; justify-self:center; width:100%; max-width:264px; min-height:39px; padding:6px 30px; font-size:14px; text-align:center; }
}
