      :root {
        --font-ui: "Segoe UI", "Yu Gothic UI", "Hiragino Sans", "Meiryo", sans-serif;
        --app-shell-max-width: 860px;
        --app-shell-half-width: calc(var(--app-shell-max-width) / 2);
        --bg: #f1f7f8;
        --bg-warm: #f7f4e9;
        --page-bg: rgb(231, 244, 242);
        --panel: #ffffff;
        --border: rgba(26, 53, 74, 0.12);
        --text: #11324d;
        --muted: #5d7388;
        --accent: #0f8f7b;
        --accent-dark: #0c7464;
        --accent-rgb: 15,143,123;
        --shadow: 0 24px 45px rgba(18, 41, 61, 0.14);
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        min-height: 100vh;
        font-family: var(--font-ui);
        color: var(--text);
        background: var(--page-bg);
        display: grid;
        place-items: start center;
        padding: 24px 16px;
        overflow-x: hidden;
      }

      input,
      button,
      select,
      textarea,
      pre {
        font-family: inherit;
      }

      .app {
        position: relative;
        --card-fixed-edge-gap: max(16px, calc(50% - var(--app-shell-half-width)));
        --top-nav-button-size: calc(38px + var(--app-font-size-offset, 0px));
        --top-nav-icon-size: calc(20px + var(--app-font-size-offset, 0px));
        --top-nav-radius: calc(12px + (var(--app-font-size-offset, 0px) / 2));
        --top-nav-ticket-font-size: calc(13px + var(--app-font-size-offset, 0px));
        --top-nav-ticket-gap: calc(4px + (var(--app-font-size-offset, 0px) / 2));
        --top-nav-ticket-padding-x: calc(8px + (var(--app-font-size-offset, 0px) / 2));
        --top-nav-top: calc(30px + var(--app-font-size-offset, 0px));
        --top-nav-side-offset: calc(8px + (var(--app-font-size-offset, 0px) / 2));
        --top-search-top: calc(72px + var(--app-font-size-offset, 0px));
        --top-search-width: calc(100px + (var(--app-font-size-offset, 0px) * 3));
        --top-search-height: calc(28px + var(--app-font-size-offset, 0px));
        --top-search-radius: calc(10px + (var(--app-font-size-offset, 0px) / 2));
        --top-search-gap: calc(6px + (var(--app-font-size-offset, 0px) / 2));
        --top-search-font-size: calc(11px + var(--app-font-size-offset, 0px));
        --top-search-padding-x: calc(9px + (var(--app-font-size-offset, 0px) / 2));
        width: min(100%, var(--app-shell-max-width));
        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 24px;
        padding: 28px;
        box-shadow: 0 24px 45px rgba(21, 43, 62, 0.14);
        min-width: 0;
      }

      .top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        min-width: 0;
        margin-top: calc(30px + var(--app-font-size-offset, 0px));
        min-height: var(--top-nav-button-size);
        padding-right: calc(150px + (var(--app-font-size-offset, 0px) * 3));
      }

      .top-row > h1 {
        margin-left: 8px;
      }

      h1 {
        margin: 0;
        font-size: clamp(28px, 6vw, 40px);
        line-height: 1.1;
      }

      .back-link {
        color: var(--accent);
        text-decoration: none;
        font-weight: 700;
      }

      .top-nav {
        display: contents;
      }

      .top-nav-link {
        width: var(--top-nav-button-size);
        min-height: var(--top-nav-button-size);
        border: none;
        border-radius: var(--top-nav-radius);
        background: rgba(255, 255, 255, 0.85);
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--accent);
        text-decoration: none;
      }

      .top-nav-link:hover {
        background: rgba(var(--accent-rgb), 0.10);
      }

      .top-nav-link svg {
        width: var(--top-nav-icon-size);
        height: var(--top-nav-icon-size);
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .ticket-nav-link {
        width: auto;
        min-width: 0;
        padding: 0 var(--top-nav-ticket-padding-x);
        gap: var(--top-nav-ticket-gap);
        font-size: var(--top-nav-ticket-font-size);
        font-weight: 700;
        white-space: nowrap;
      }

      .ticket-nav-link svg {
        flex: 0 0 auto;
      }

      .ticket-points {
        line-height: 1;
        font-variant-numeric: tabular-nums;
      }

      .nav-right-1 {
        position: fixed;
        top: var(--top-nav-top);
        right: calc(var(--card-fixed-edge-gap) + 88px + (var(--app-font-size-offset, 0px) * 2));
        z-index: 20;
      }

      .nav-right-2 {
        position: fixed;
        top: var(--top-nav-top);
        right: calc(var(--card-fixed-edge-gap) + 46px + var(--app-font-size-offset, 0px));
        z-index: 20;
      }

      .nav-right-3 {
        position: fixed;
        top: var(--top-nav-top);
        right: calc(var(--card-fixed-edge-gap) + var(--top-nav-side-offset));
        z-index: 20;
      }

      .back-nav-button {
        position: fixed;
        top: var(--top-nav-top);
        left: calc(var(--card-fixed-edge-gap) + var(--top-nav-side-offset));
        z-index: 20;
      }

      .back-search-form {
        position: fixed;
        top: var(--top-search-top);
        right: calc(var(--card-fixed-edge-gap) + calc(10px + (var(--app-font-size-offset, 0px) / 2)));
        z-index: 20;
        width: max-content;
        display: grid;
        grid-template-columns: var(--top-search-width) auto;
        gap: var(--top-search-gap);
        align-items: stretch;
      }

      .back-search-input {
        min-width: 0;
        width: var(--top-search-width);
        height: var(--top-search-height);
        border: 1px solid rgba(var(--accent-rgb), 0.2);
        border-radius: var(--top-search-radius);
        background: rgba(255, 255, 255, 0.96);
        padding: 0 var(--top-search-padding-x);
        font-size: var(--top-search-font-size);
        color: var(--text);
      }

      .back-search-input:focus {
        outline: none;
        border-color: rgba(var(--accent-rgb), 0.6);
        box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
      }

      .back-search-submit {
        height: var(--top-search-height);
        border: none;
        border-radius: var(--top-search-radius);
        background: var(--accent);
        color: #ffffff;
        padding: 0 calc(10px + (var(--app-font-size-offset, 0px) / 2));
        font-size: var(--top-search-font-size);
        font-weight: 700;
        cursor: pointer;
      }

      .back-search-submit:hover {
        background: var(--accent-dark);
      }

      .lead {
        margin: 12px 0 20px;
        color: var(--muted);
        font-size: 14px;
      }

      .profile-meta {
        width: 100%;
        margin-top: 14px;
        padding: 12px;
        border: 1px solid rgba(var(--accent-rgb), 0.16);
        border-radius: 14px;
        background: rgba(var(--accent-rgb), 0.06);
      }

      .profile-meta-label {
        display: block;
        margin-bottom: 4px;
        font-size: 12px;
        font-weight: 700;
        color: var(--muted);
        letter-spacing: 0.04em;
        text-transform: uppercase;
      }

      .profile-meta-value {
        margin: 0;
        color: var(--text);
        font-size: 14px;
        line-height: 1.7;
        word-break: break-word;
      }

      .profile-meta-inline {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .profile-meta-copy {
        min-width: 0;
        flex: 1 1 auto;
      }

      .profile-meta-value-single-line {
        display: block;
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        text-overflow: clip;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
      }

      .profile-meta-actions {
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 8px;
        flex: 0 0 auto;
      }

      .auth-inline-link {
        appearance: none;
        border: none;
        background: transparent;
        padding: 2px 0;
        margin: 0;
        display: inline-flex;
        align-items: center;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
        text-decoration: none;
        cursor: pointer;
        white-space: nowrap;
      }

      .auth-inline-link-primary {
        color: var(--accent);
      }

      .auth-inline-link-muted {
        color: var(--muted);
      }

      .auth-inline-link:hover {
        text-decoration: underline;
      }

      .auth-inline-link:disabled {
        opacity: 0.65;
        cursor: wait;
      }

      .profile-actions {
        margin-top: 14px;
        display: grid;
        gap: 10px;
      }

      .auth-status {
        margin-top: 12px;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.7;
        word-break: break-word;
      }

      .remember-login-option {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-top: 14px;
        color: var(--text);
        font-size: 13px;
        line-height: 1.6;
        cursor: pointer;
      }

      .remember-login-checkbox {
        width: 16px;
        height: 16px;
        accent-color: var(--accent);
        cursor: pointer;
      }

      .remember-login-checkbox:disabled {
        cursor: not-allowed;
      }

      .remember-login-hint {
        margin: 8px 0 0;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.6;
      }

      .auth-conflict-panel {
        margin-top: 14px;
        padding: 14px;
        border: 1px solid rgba(185, 56, 56, 0.18);
        border-radius: 14px;
        background: #fff7f5;
      }

      .auth-conflict-copy {
        margin: 0;
        color: #8d3f2d;
        font-size: 14px;
        line-height: 1.7;
      }

      .auth-conflict-actions {
        display: grid;
        gap: 10px;
        margin-top: 12px;
      }

      .danger-btn {
        margin-top: 12px;
        border: 1px solid rgba(185, 56, 56, 0.24);
        background: #fff5f5;
        color: #a12d2d;
        border-radius: 12px;
        min-height: 42px;
        padding: 0 14px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
      }

      .danger-btn:disabled {
        opacity: 0.65;
        cursor: wait;
      }

      .unlink-account-button {
        background: #fdecec;
        color: #b33a3a;
        border-color: rgba(185, 56, 56, 0.18);
      }

      .unlink-account-button:hover {
        background: #f9dede;
      }

      .status {
        margin-top: 10px;
        color: var(--muted);
        font-size: 13px;
        min-height: 1.4em;
      }

      .action-btn {
        margin-top: 12px;
        border-radius: 12px;
        min-height: 42px;
        padding: 0 14px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        width: 100%;
        border: 1px solid transparent;
        background: #ffffff;
        color: var(--text);
      }

      .action-btn-inline {
        margin-top: 0;
        width: auto;
        min-width: 88px;
        white-space: nowrap;
      }

      .action-btn:disabled {
        opacity: 0.65;
        cursor: wait;
      }

      .action-btn.toggle-on {
        border-color: var(--accent);
        background: var(--accent);
        color: #ffffff;
      }

      .action-btn.toggle-off {
        border-color: rgba(97, 120, 142, 0.28);
        background: #f5f7fa;
        color: #4f6273;
      }

      .font-size-row {
        margin-top: 12px;
        display: flex;
        gap: 8px;
        flex-wrap: nowrap;
      }

      .font-size-btn {
        flex: 1 1 0;
        min-width: 0;
      }

      .bulk-action-grid {
        display: grid;
        gap: 12px;
        margin-top: 12px;
      }

      @media (max-width: 640px) {
        .profile-meta-inline {
          align-items: flex-start;
        }

        .profile-meta-actions {
          flex-direction: row;
          align-items: flex-start;
          gap: 6px;
        }

        .action-btn-inline {
          min-width: 0;
        }
      }

      .bulk-action-group {
        display: grid;
        gap: 10px;
      }

      .bulk-action-group h3 {
        margin: 0;
        font-size: 15px;
      }

      .bulk-action-status {
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid rgba(var(--accent-rgb), 0.12);
      }

      .link-btn {
        margin-top: 12px;
        border: 1px solid rgba(var(--accent-rgb), 0.28);
        background: #fff5f5;
        color: #a12d2d;
        border-radius: 12px;
        min-height: 40px;
        padding: 0 14px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
      }

      .link-btn.neutral {
        background: rgba(var(--accent-rgb), 0.08);
        color: var(--accent-dark);
      }

      .theme-selector-grid {
        display: grid;
        grid-template-columns: repeat(10, minmax(0, 1fr));
        gap: 10px;
        justify-items: center;
        align-items: center;
        margin-top: 10px;
        width: 100%;
        max-width: none;
      }

      @media (max-width: 700px) {
        body {
          padding-bottom: 34px;
        }

        .app {
          margin-bottom: 12px;
        }

        .theme-selector-grid {
          grid-template-columns: repeat(5, 1fr);
          max-width: 340px;
        }
        .theme-btn {
          width: 100%;
          aspect-ratio: 1 / 1;
        }
      }

      .theme-btn {
        width: 100%;
        max-width: 56px;
        aspect-ratio: 1;
        border: 3px solid transparent;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
      }

      .theme-btn:hover {
        transform: scale(1.08);
      }

      .theme-btn.active {
        border-color: #000;
        box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000;
      }

      .settings-panel {
        --shared-card-margin-top: 16px;
        --shared-card-border: 1px solid var(--border);
        --shared-card-radius: 16px;
        --shared-card-background: #ffffff;
        --shared-card-min-width: 0;
        --shared-card-max-width: 100%;
      }

      .settings-section {
        padding: 12px 14px 14px;
        border-top: 1px solid rgba(var(--accent-rgb), 0.12);
      }

      .settings-section:first-of-type {
        border-top: none;
      }

      .settings-section-title {
        margin: 0;
        font-size: 13px;
        font-weight: 700;
        color: var(--accent-dark);
        letter-spacing: 0.05em;
        text-transform: uppercase;
      }

      .settings-section-copy {
        margin: 10px 0 0;
        color: var(--muted);
        line-height: 1.7;
      }

      .theme-teal { background: #0f8f7b; }
      .theme-blue { background: #3b82f6; }
      .theme-indigo { background: #6366f1; }
      .theme-purple { background: #8b5cf6; }
      .theme-pink { background: #ec4899; }
      .theme-red { background: #ef4444; }
      .theme-orange { background: #f97316; }
      .theme-yellow { background: #eab308; }
      .theme-lime { background: #84cc16; }
      .theme-green { background: #22c55e; }