﻿@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Zen+Maru+Gothic:wght@400;500;700;900&display=swap");

:root {
  --ink: #263653;
  --muted: #65758f;
  --line: rgba(118, 159, 184, .28);
  --panel: rgba(255, 255, 255, .84);
  --panel-strong: rgba(255, 255, 255, .96);
  --aqua: #38c4cf;
  --blue: #6aa6df;
  --violet: #b68bea;
  --rose: #efb8d0;
  --gold: #c6a45f;
  --danger: #d45d7b;
  --shadow: 0 12px 28px rgba(60, 92, 124, .15);
  --radius-card: 8px;
  --bottom-nav-height: 78px;
  --bottom-ad-height: 56px;
  --font-ui: "Zen Maru Gothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(222, 249, 251, .96) 0%, rgba(250, 247, 255, .98) 48%, rgba(236, 250, 253, .96) 100%),
    #f4fbff;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='760' height='350' viewBox='0 0 760 350'%3E%3Cdefs%3E%3ClinearGradient id='sea' x1='0' x2='1'%3E%3Cstop stop-color='%23bfeff4' stop-opacity='.65'/%3E%3Cstop offset='.5' stop-color='%23ffffff' stop-opacity='.4'/%3E%3Cstop offset='1' stop-color='%23e6cff7' stop-opacity='.58'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='760' height='350' fill='url(%23sea)'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.62' stroke-width='3'%3E%3Cpath d='M0 84c80-38 152-37 216 0s142 38 232 0 180-38 312 0'/%3E%3Cpath d='M0 126c80-38 152-37 216 0s142 38 232 0 180-38 312 0'/%3E%3C/g%3E%3Cg fill='none' stroke='%2386ccd4' stroke-opacity='.28'%3E%3Cpath d='M60 240c36-44 74-44 110 0' stroke-width='7'/%3E%3Cpath d='M94 198v88M70 240h88M84 210c-12 24-17 48-14 75M104 210c12 24 17 48 14 75' stroke-width='4'/%3E%3Cpath d='M646 188c32-38 66-38 98 0' stroke-width='7'/%3E%3Cpath d='M676 154v78M656 188h72M666 164c-11 20-15 43-12 66M686 164c11 20 15 43 12 66' stroke-width='4'/%3E%3Cpath d='M585 236c14-38 34-57 61-58M610 248c12-32 31-49 57-52M636 252c8-22 23-34 45-35' stroke='%23dca7cc' stroke-width='5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: min(100vw, 760px) auto;
}

body[data-app-background="basic_1"],
body[data-app-background="basic_2"] {
  background: #f5fbff;
}

body[data-app-background="basic_1"]::before,
body[data-app-background="basic_2"]::before {
  opacity: 1;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

body[data-app-background="basic_1"]::before {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(244, 251, 255, .22)),
    url("assets/app-background-1.png");
}

body[data-app-background="basic_2"]::before {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(244, 251, 255, .24)),
    url("assets/app-background-2.png");
}

body[data-app-background="pearl_white_1"],
body[data-app-background="pearl_white_2"],
body[data-app-background="deep_ocean_1"],
body[data-app-background="deep_ocean_2"],
body[data-app-background="twilight_luxury_1"],
body[data-app-background="twilight_luxury_2"],
body[data-app-background="human_1"],
body[data-app-background="human_2"] {
  background: #f5fbff;
}

body[data-app-background="pearl_white_1"]::before,
body[data-app-background="pearl_white_2"]::before,
body[data-app-background="deep_ocean_1"]::before,
body[data-app-background="deep_ocean_2"]::before,
body[data-app-background="twilight_luxury_1"]::before,
body[data-app-background="twilight_luxury_2"]::before,
body[data-app-background="human_1"]::before,
body[data-app-background="human_2"]::before {
  opacity: 1;
  mix-blend-mode: normal;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

body[data-app-background="pearl_white_1"]::before {
  background-image: url("assets/app-background-pearl-white-1.png");
}

body[data-app-background="pearl_white_2"]::before {
  background-image: url("assets/app-background-pearl-white-2.png");
}

body[data-app-background="deep_ocean_1"]::before {
  background-image: url("assets/app-background-deep-ocean-1.png");
}

body[data-app-background="deep_ocean_2"]::before {
  background-image: url("assets/app-background-deep-ocean-2.png");
}

body[data-app-background="twilight_luxury_1"]::before {
  background-image: url("assets/app-background-twilight-luxury-1.png");
}

body[data-app-background="twilight_luxury_2"]::before {
  background-image: url("assets/app-background-twilight-luxury-2.png");
}

body[data-app-background="human_1"]::before {
  background-image: url("assets/app-background-human-1.png");
}

body[data-app-background="human_2"]::before {
  background-image: url("assets/app-background-human-2.png");
}

body[data-skin="pearl_white"] {
  --ink: #263653;
  --muted: #65758f;
  --line: rgba(118, 159, 184, .28);
  --panel: rgba(255, 255, 255, .84);
  --panel-strong: rgba(255, 255, 255, .96);
  --aqua: #38c4cf;
  --blue: #6aa6df;
  --violet: #b68bea;
  --rose: #efb8d0;
  background:
    radial-gradient(circle at 82% 8%, rgba(239, 211, 255, .42), transparent 22rem),
    linear-gradient(180deg, rgba(222, 249, 251, .96) 0%, rgba(250, 247, 255, .98) 48%, rgba(236, 250, 253, .96) 100%),
    #f4fbff;
}

body[data-skin="deep_ocean"] {
  --ink: #edfaff;
  --muted: #b7d4e4;
  --line: rgba(169, 224, 239, .24);
  --panel: rgba(10, 36, 61, .76);
  --panel-strong: rgba(12, 46, 75, .92);
  --aqua: #55d9e5;
  --blue: #2c8ec4;
  --violet: #8a80d7;
  --rose: #d8b3df;
  --gold: #dac58d;
  background:
    radial-gradient(circle at 88% 12%, rgba(101, 206, 232, .24), transparent 20rem),
    linear-gradient(180deg, #082540 0%, #0a395b 46%, #071c34 100%);
}

body[data-skin="deep_ocean"]::before {
  opacity: .28;
  mix-blend-mode: screen;
}

body[data-skin="twilight_luxury"] {
  --ink: #34283e;
  --muted: #7c657c;
  --line: rgba(207, 162, 179, .35);
  --panel: rgba(255, 246, 241, .82);
  --panel-strong: rgba(255, 250, 247, .95);
  --aqua: #55c7d2;
  --blue: #7b8ed6;
  --violet: #b58ce5;
  --rose: #edacba;
  --gold: #d3a86c;
  background:
    radial-gradient(circle at 84% 10%, rgba(249, 192, 122, .36), transparent 20rem),
    linear-gradient(180deg, #ffe1cf 0%, #efd9ff 45%, #d9f5fb 100%);
}

body[data-skin="human"] {
  --ink: #1f2d3d;
  --muted: #64748b;
  --line: #d8dee8;
  --panel: rgba(255, 255, 255, .94);
  --panel-strong: #ffffff;
  --aqua: #247a8f;
  --blue: #2f5f94;
  --violet: #69738a;
  --rose: #9aa6b7;
  --gold: #8a7b5a;
  background: #f4f7fb;
}

body[data-skin="human"]::before {
  opacity: 0;
}

body[data-app-background="pearl_white"] {
  --ink: #263653;
  --muted: #65758f;
  --line: rgba(118, 159, 184, .28);
  --panel: rgba(255, 255, 255, .84);
  --panel-strong: rgba(255, 255, 255, .96);
  --aqua: #38c4cf;
  --blue: #6aa6df;
  --violet: #b68bea;
  --rose: #efb8d0;
  background:
    radial-gradient(circle at 82% 8%, rgba(239, 211, 255, .42), transparent 22rem),
    linear-gradient(180deg, rgba(222, 249, 251, .96) 0%, rgba(250, 247, 255, .98) 48%, rgba(236, 250, 253, .96) 100%),
    #f4fbff;
}

body[data-app-background="deep_ocean"] {
  --ink: #edfaff;
  --muted: #b7d4e4;
  --line: rgba(169, 224, 239, .24);
  --panel: rgba(10, 36, 61, .76);
  --panel-strong: rgba(12, 46, 75, .92);
  --aqua: #55d9e5;
  --blue: #2c8ec4;
  --violet: #8a80d7;
  --rose: #d8b3df;
  --gold: #dac58d;
  background:
    radial-gradient(circle at 88% 12%, rgba(101, 206, 232, .24), transparent 20rem),
    linear-gradient(180deg, #082540 0%, #0a395b 46%, #071c34 100%);
}

body[data-app-background="deep_ocean"]::before {
  opacity: .28;
  mix-blend-mode: screen;
}

body[data-app-background="twilight_luxury"] {
  --ink: #34283e;
  --muted: #7c657c;
  --line: rgba(207, 162, 179, .35);
  --panel: rgba(255, 246, 241, .82);
  --panel-strong: rgba(255, 250, 247, .95);
  --aqua: #55c7d2;
  --blue: #7b8ed6;
  --violet: #b58ce5;
  --rose: #edacba;
  --gold: #d3a86c;
  background:
    radial-gradient(circle at 84% 10%, rgba(249, 192, 122, .36), transparent 20rem),
    linear-gradient(180deg, #ffe1cf 0%, #efd9ff 45%, #d9f5fb 100%);
}

body[data-app-background="human"] {
  --ink: #1f2d3d;
  --muted: #64748b;
  --line: #d8dee8;
  --panel: rgba(255, 255, 255, .94);
  --panel-strong: #ffffff;
  --aqua: #247a8f;
  --blue: #2f5f94;
  --violet: #69738a;
  --rose: #9aa6b7;
  --gold: #8a7b5a;
  background: #f4f7fb;
}

body[data-app-background="human"]::before {
  opacity: 0;
}

body[data-skin][data-app-background="basic_1"],
body[data-skin][data-app-background="basic_2"],
body[data-skin][data-app-background="pearl_white_1"],
body[data-skin][data-app-background="pearl_white_2"],
body[data-skin][data-app-background="deep_ocean_1"],
body[data-skin][data-app-background="deep_ocean_2"],
body[data-skin][data-app-background="twilight_luxury_1"],
body[data-skin][data-app-background="twilight_luxury_2"],
body[data-skin][data-app-background="human_1"],
body[data-skin][data-app-background="human_2"] {
  background: #f5fbff;
}

body[data-skin][data-app-background="basic_1"]::before,
body[data-skin][data-app-background="basic_2"]::before,
body[data-skin][data-app-background="pearl_white_1"]::before,
body[data-skin][data-app-background="pearl_white_2"]::before,
body[data-skin][data-app-background="deep_ocean_1"]::before,
body[data-skin][data-app-background="deep_ocean_2"]::before,
body[data-skin][data-app-background="twilight_luxury_1"]::before,
body[data-skin][data-app-background="twilight_luxury_2"]::before,
body[data-skin][data-app-background="human_1"]::before,
body[data-skin][data-app-background="human_2"]::before {
  opacity: 1;
  mix-blend-mode: normal;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

body[data-skin][data-app-background="basic_1"]::before {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(244, 251, 255, .22)),
    url("assets/app-background-1.png");
}

body[data-skin][data-app-background="basic_2"]::before {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(244, 251, 255, .24)),
    url("assets/app-background-2.png");
}

body[data-skin="pearl_white"][data-app-background="basic_1"],
body[data-skin="pearl_white"][data-app-background="basic_2"] {
  --ink: #243653;
  --muted: #5e7089;
  --line: rgba(105, 151, 178, .32);
  --panel: rgba(255, 255, 255, .88);
  --panel-strong: rgba(255, 255, 255, .97);
  --aqua: #22aebc;
  --blue: #4f8fcc;
  --violet: #9a7de2;
  --rose: #dd9fbd;
  --shadow: 0 12px 28px rgba(50, 82, 112, .16);
}

body[data-skin="deep_ocean"][data-app-background="basic_1"],
body[data-skin="deep_ocean"][data-app-background="basic_2"] {
  --ink: #16324e;
  --muted: #51697f;
  --line: rgba(72, 128, 156, .34);
  --panel: rgba(244, 252, 255, .88);
  --panel-strong: rgba(255, 255, 255, .96);
  --aqua: #149daf;
  --blue: #276f9c;
  --violet: #6379c4;
  --rose: #a77ec3;
  --gold: #9a7a34;
  --shadow: 0 12px 28px rgba(32, 72, 102, .18);
}

body[data-skin="twilight_luxury"][data-app-background="basic_1"],
body[data-skin="twilight_luxury"][data-app-background="basic_2"] {
  --ink: #372b44;
  --muted: #6e6177;
  --line: rgba(161, 124, 163, .34);
  --panel: rgba(255, 250, 252, .88);
  --panel-strong: rgba(255, 255, 255, .97);
  --aqua: #1ca9b5;
  --blue: #6279c6;
  --violet: #9b73d8;
  --rose: #d587a1;
  --gold: #b58245;
  --shadow: 0 12px 28px rgba(104, 79, 121, .15);
}

body[data-skin="human"][data-app-background="basic_1"],
body[data-skin="human"][data-app-background="basic_2"] {
  --ink: #1f2d3d;
  --muted: #5b6878;
  --line: rgba(91, 113, 135, .28);
  --panel: rgba(255, 255, 255, .9);
  --panel-strong: rgba(255, 255, 255, .98);
  --aqua: #247a8f;
  --blue: #2f5f94;
  --violet: #667286;
  --rose: #8f9baa;
  --gold: #806f4f;
  --shadow: 0 10px 24px rgba(49, 68, 88, .14);
}

body[data-skin][data-app-background="basic_2"] {
  --panel: rgba(255, 255, 255, .92);
  --panel-strong: rgba(255, 255, 255, .98);
}

body[data-skin="deep_ocean"]:not([data-app-background]) .modal-card,
body[data-skin="deep_ocean"]:not([data-app-background]) .next-card,
body[data-skin="deep_ocean"]:not([data-app-background]) .support-card,
body[data-skin="deep_ocean"]:not([data-app-background]) .notification-status,
body[data-skin="deep_ocean"]:not([data-app-background]) .notification-history-panel,
body[data-skin="deep_ocean"]:not([data-app-background]) .notification-history-item,
body[data-skin="deep_ocean"]:not([data-app-background]) .tutorial-step,
body[data-skin="deep_ocean"]:not([data-app-background]) .calendar-sync,
body[data-skin="deep_ocean"]:not([data-app-background]) .avatar-upload-preview,
body[data-skin="deep_ocean"]:not([data-app-background]) .item-image-picker,
body[data-skin="deep_ocean"]:not([data-app-background]) .activity-image-picker {
  --ink: #263653;
  --muted: #60728b;
  --line: rgba(118, 159, 184, .28);
  --panel: rgba(255, 255, 255, .88);
  --panel-strong: rgba(255, 255, 255, .96);
  color: var(--ink);
}

body[data-skin="deep_ocean"]:not([data-app-background]) .profile-hero h2,
body[data-skin="deep_ocean"]:not([data-app-background]) .profile-edit-head h2,
body[data-skin="deep_ocean"]:not([data-app-background]) .stat-card strong,
body[data-skin="deep_ocean"]:not([data-app-background]) .summary-panel strong,
body[data-skin="deep_ocean"]:not([data-app-background]) .gallery-summary strong,
body[data-skin="deep_ocean"]:not([data-app-background]) .activity-card p,
body[data-skin="deep_ocean"]:not([data-app-background]) .item-card p,
body[data-skin="deep_ocean"]:not([data-app-background]) .switch-row,
body[data-skin="deep_ocean"]:not([data-app-background]) .activity-list-divider,
body[data-skin="deep_ocean"]:not([data-app-background]) .summary-panel ol {
  color: var(--ink);
}

body[data-skin="deep_ocean"]:not([data-app-background]) .profile-hero h2,
body[data-skin="deep_ocean"]:not([data-app-background]) .screen h1 {
  color: #f3fdff;
  text-shadow: 0 2px 12px rgba(1, 18, 34, .42);
}

body[data-skin="deep_ocean"]:not([data-app-background]) .activity-card p,
body[data-skin="deep_ocean"]:not([data-app-background]) .item-card p,
body[data-skin="deep_ocean"]:not([data-app-background]) .switch-row,
body[data-skin="deep_ocean"]:not([data-app-background]) .activity-list-divider,
body[data-skin="deep_ocean"]:not([data-app-background]) .summary-panel ol {
  color: #d3ecf6;
}

body[data-skin="deep_ocean"]:not([data-app-background]) .next-card h3,
body[data-skin="deep_ocean"]:not([data-app-background]) .next-card span,
body[data-skin="deep_ocean"]:not([data-app-background]) .modal-card h2,
body[data-skin="deep_ocean"]:not([data-app-background]) .modal-card h3,
body[data-skin="deep_ocean"]:not([data-app-background]) .modal-card label {
  color: var(--ink);
  text-shadow: none;
}

body[data-skin="deep_ocean"]:not([data-app-background]) .modal-card .form-note,
body[data-skin="deep_ocean"]:not([data-app-background]) .background-card small,
body[data-skin="deep_ocean"]:not([data-app-background]) .notification-status p,
body[data-skin="deep_ocean"]:not([data-app-background]) .notification-history-item small,
body[data-skin="deep_ocean"]:not([data-app-background]) .notification-history-item p,
body[data-skin="deep_ocean"]:not([data-app-background]) .tutorial-lead,
body[data-skin="deep_ocean"]:not([data-app-background]) .tutorial-step p,
body[data-skin="deep_ocean"]:not([data-app-background]) .calendar-sync p {
  color: var(--muted);
}

body[data-skin="deep_ocean"] .design-setting-block,
body[data-skin="deep_ocean"] .background-card {
  --ink: #263653;
  --muted: #60728b;
  --line: rgba(118, 159, 184, .28);
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
}

body[data-skin="deep_ocean"] .background-card small,
body[data-skin="deep_ocean"] .design-setting-block .form-note {
  color: var(--muted);
}

body[data-skin="deep_ocean"] .screen h1,
body[data-skin="deep_ocean"] .section-head h2,
body[data-skin="deep_ocean"] .profile-hero h2,
body[data-skin="deep_ocean"] .activity-card h3,
body[data-skin="deep_ocean"] .item-card h3,
body[data-skin="deep_ocean"] .summary-panel h2,
body[data-skin="deep_ocean"] .gallery-summary h2 {
  color: #f3fdff;
  text-shadow: 0 2px 12px rgba(1, 18, 34, .45);
}

body[data-skin="deep_ocean"] .activity-card p,
body[data-skin="deep_ocean"] .item-card p,
body[data-skin="deep_ocean"] .summary-panel,
body[data-skin="deep_ocean"] .gallery-summary {
  color: #d6edf7;
}

body[data-skin="deep_ocean"] .bottom-nav,
body[data-skin="deep_ocean"] .bottom-nav *,
body[data-skin="deep_ocean"] .modal-card,
body[data-skin="deep_ocean"] .notification-status,
body[data-skin="deep_ocean"] .notification-history-panel,
body[data-skin="deep_ocean"] .notification-history-item,
body[data-skin="deep_ocean"] .next-card,
body[data-skin="deep_ocean"] .next-card h3,
body[data-skin="deep_ocean"] .next-card span,
body[data-skin="deep_ocean"] .next-card p {
  color: #263653;
  text-shadow: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

img {
  display: block;
  max-width: 100%;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 28px 116px;
  position: relative;
}

body.has-bottom-ad .app-shell {
  padding-bottom: calc(116px + var(--bottom-ad-height));
}

.app-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.header-help-group {
  display: inline-grid;
  grid-template-columns: 48px 40px;
  gap: 8px;
  align-items: center;
}

.header-help-group .tutorial-help-button {
  width: 40px;
  height: 40px;
  color: #4b617f;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  color: #26395f;
  font-family: var(--font-display);
  font-size: 0;
  line-height: 1;
  text-align: center;
  text-shadow: none;
  white-space: nowrap;
}

.brand-mark img {
  display: block;
  width: min(100%, 430px);
  max-height: 86px;
  object-fit: contain;
}

.brand-shell {
  display: none;
  color: rgba(80, 141, 168, .58);
}

.round-button,
.premium-button,
.text-button,
.secondary-small,
.icon-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 6px 16px rgba(65, 102, 138, .12);
}

.round-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.notify {
  position: relative;
  color: #31435e;
}

.notify::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 5px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--violet);
}

.premium-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 10px 15px;
  color: #7a5a13;
  white-space: nowrap;
}

.setup-banner,
.notice {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(198, 164, 95, .35);
  border-radius: var(--radius-card);
  margin: 0 0 18px;
  padding: 14px 16px;
  background: rgba(255, 250, 235, .9);
  box-shadow: var(--shadow);
}

.setup-banner a,
.primary-link,
.secondary-link {
  color: #176a76;
  font-weight: 800;
  text-decoration: none;
}

.support-card {
  border: 1px solid rgba(162, 123, 222, .2);
  border-radius: 8px;
  background: rgba(250, 247, 255, .8);
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid rgba(75, 195, 202, .28);
  border-radius: 999px;
  padding: 6px 12px;
  color: #166c75;
  background: rgba(255, 255, 255, .86);
  font-weight: 900;
  text-decoration: none;
}

.support-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.support-card strong {
  color: #26395f;
  font-size: 1rem;
}

.support-card p {
  margin: 0;
  color: #5e6f8b;
  font-size: .9rem;
  line-height: 1.5;
}

.demo-login-card {
  border-color: rgba(198, 164, 95, .32);
  background: rgba(255, 250, 235, .88);
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.user-ad-form {
  display: grid;
  gap: 14px;
}

.user-ad-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
}

.user-ad-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.user-ad-table th,
.user-ad-table td {
  border-bottom: 1px solid rgba(132, 164, 190, .18);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

.user-ad-table th {
  color: #60728e;
  background: rgba(241, 250, 253, .78);
  font-size: .82rem;
}

.user-ad-table td strong,
.user-ad-table td small {
  display: block;
}

.user-ad-table td small {
  margin-top: 2px;
  color: #7b8aa1;
}

.user-ad-table select,
.user-ad-table input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, .94);
}

.login-gate {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 210px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-gate[hidden] {
  display: none;
}

.login-panel {
  width: min(100%, 520px);
  padding: 28px;
  text-align: center;
}

.login-panel .card-icon {
  margin: 0 auto 14px;
}

.login-panel h1 {
  margin: 0 0 10px;
}

.login-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
  border-radius: 999px;
  padding: 5px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
}

.auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  color: #5b6d88;
  background: transparent;
  font-weight: 900;
}

.auth-tabs button.active {
  color: #fff;
  background: linear-gradient(100deg, var(--aqua), var(--violet));
  box-shadow: 0 8px 18px rgba(58, 196, 207, .22);
}

.login-form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #485a76;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: #263653;
  background: rgba(255, 255, 255, .94);
}

.login-form .remember-login {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(93, 174, 183, .2);
  border-radius: 8px;
  padding: 10px 12px;
  color: #50627d;
  background: rgba(244, 251, 255, .78);
  font-size: .94rem;
  font-weight: 900;
}

.login-form .remember-login input {
  width: 20px;
  height: 20px;
  padding: 0;
  accent-color: #29b8c0;
}

.auth-form .form-actions {
  justify-content: stretch;
}

.auth-form .primary-cta,
.auth-form .secondary-cta {
  flex: 1;
}

.screen h1 {
  margin: 10px 0 24px;
  text-align: center;
  font-size: 1.55rem;
  line-height: 1.3;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fade .2s ease;
}

@keyframes fade {
  from {
    opacity: .45;
    transform: translateY(5px);
  }
}

.panel,
.next-card,
.stat-card,
.profile-edit-head,
.item-card,
.activity-card,
.gallery-summary,
.bulk-bar,
.modal-card,
.setup-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.profile-hero {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 22px;
}

.profile-hero img,
.profile-edit-head img,
.avatar-wrap img {
  width: 128px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 4px solid rgba(75, 203, 211, .45);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(81, 125, 151, .16);
}

.profile-hero p,
.profile-copy label {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 700;
}

.profile-hero h2,
.profile-edit-head h2 {
  margin: 0 0 10px;
  color: #203657;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.05;
}

.badge,
.chip,
.activity-tag,
.item-tag {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(190, 163, 226, .34);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, .68);
  color: #74718f;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.next-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 44px;
  gap: 16px;
  align-items: center;
  min-height: 118px;
  padding: 20px;
  margin-bottom: 14px;
  background: linear-gradient(110deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .64));
  backdrop-filter: blur(18px);
}

.next-card:empty {
  min-height: 118px;
}

.next-card > div:not(.card-icon) {
  min-width: 0;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 76px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--aqua);
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 0 0 5px rgba(68, 196, 207, .12);
}

.card-icon svg {
  width: 34px;
  height: 34px;
}

.next-card p,
.next-card h3,
.next-card span {
  margin: 0;
}

.next-card p {
  color: #16818b;
  font-weight: 800;
}

.next-card h3 {
  margin: 4px 0 8px;
  font-size: 1.28rem;
}

.next-card span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.stat-card {
  min-height: 128px;
  padding: 17px;
  background: var(--panel-strong);
}

.stat-card[data-action] {
  cursor: pointer;
}

.stat-card[data-action]:focus-visible {
  outline: 3px solid rgba(56, 196, 207, .55);
  outline-offset: 2px;
}

.stat-card .stat-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #6c76a6;
  background: linear-gradient(140deg, rgba(215, 248, 251, .8), rgba(247, 231, 255, .8));
}

.stat-card span,
.stat-card small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.stat-card strong {
  display: inline-block;
  margin: 3px 0;
  color: #1e3455;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  line-height: .95;
}

.home-schedule-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(93, 174, 183, .28);
  border-radius: 999px;
  padding: 5px 9px;
  color: #3d5f78;
  background: rgba(255, 255, 255, .86);
  font-size: .78rem;
  font-weight: 900;
}

.bar {
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(101, 117, 143, .16);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--aqua), var(--violet));
}

.primary-cta,
.secondary-cta,
.danger-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  padding: 14px 18px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(100deg, #51c9d3, #b78cf1 64%, #e6b9dd);
  box-shadow: 0 12px 24px rgba(82, 141, 180, .22);
}

.primary-cta.small,
.secondary-cta.small {
  min-height: 48px;
  margin-top: 14px;
  font-size: .96rem;
}

.career-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.career-actions .primary-cta.small,
.career-actions .secondary-cta.small {
  flex: 1 1 0;
  margin-top: 0;
  min-width: 0;
}

.secondary-cta {
  color: #4f6683;
  background: rgba(255, 255, 255, .8);
  border-color: var(--line);
}

.danger-cta {
  color: #a23a5b;
  background: rgba(255, 244, 248, .92);
  border-color: rgba(174, 67, 96, .26);
  box-shadow: none;
}

.primary-cta.share {
  background: linear-gradient(100deg, #3bc5cf, #80cfdd 45%, #c096ed);
}

.primary-cta.compact,
.secondary-cta.compact {
  width: auto;
  min-height: 46px;
  padding: 10px 14px;
  font-size: .9rem;
  white-space: nowrap;
}

.section-head,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2,
.panel-title h3,
.panel h2,
.panel h3 {
  margin: 0;
  font-size: 1rem;
}

.section-head.compact {
  margin-top: 16px;
}

.text-button,
.icon-action,
.secondary-small {
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #5a6c86;
  font-weight: 800;
}

.text-button.danger-text {
  color: #a23a5b;
  border-color: rgba(174, 67, 96, .22);
  background: rgba(255, 244, 248, .88);
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 36px;
  padding: 0;
}

.calendar-panel {
  margin-top: 16px;
  padding: 18px;
}

.calendar-nav {
  display: inline-grid;
  grid-template-columns: 36px minmax(0, auto) 36px;
  align-items: center;
  gap: 8px;
}

.calendar-nav .icon-action {
  color: #4c7898;
  font-size: 1.45rem;
  line-height: 1;
}

.calendar-nav h2 {
  min-width: 9.5em;
  text-align: center;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin: 16px 0;
  text-align: center;
}

.mini-calendar span,
.mini-calendar button {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 50px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.mini-calendar .weekday {
  min-height: 28px;
  color: #718198;
  font-size: .86rem;
}

.mini-calendar .weekday.sunday {
  color: #bc5d72;
}

.mini-calendar .weekday.saturday {
  color: #4186a8;
}

.mini-calendar .empty-day {
  min-height: 50px;
}

.mini-calendar button.sunday:not(.selected),
.mini-calendar button.holiday:not(.selected) {
  color: #9d5265;
  background: rgba(255, 239, 243, .82);
}

.mini-calendar button.saturday:not(.selected) {
  color: #3d7f9d;
  background: rgba(229, 248, 253, .86);
}

.mini-calendar button.selected {
  color: #fff;
  background: linear-gradient(135deg, var(--aqua), var(--violet));
  box-shadow: 0 8px 16px rgba(56, 196, 207, .22);
}

.mini-calendar button.has-schedule:not(.selected) {
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 0 1px rgba(56, 196, 207, .35);
}

.mini-calendar button.has-performance:not(.selected) {
  color: #1f4965;
  box-shadow: inset 0 0 0 2px rgba(182, 139, 234, .58), 0 8px 16px rgba(80, 117, 150, .1);
}

.mini-calendar button.sunday.has-schedule:not(.selected),
.mini-calendar button.holiday.has-schedule:not(.selected) {
  background: rgba(255, 239, 243, .82);
}

.mini-calendar button.saturday.has-schedule:not(.selected) {
  background: rgba(229, 248, 253, .86);
}

.mini-calendar button.selected.has-schedule,
.mini-calendar button.selected.has-performance {
  color: #fff;
}

.mini-calendar button small {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: var(--aqua);
  font-size: .7rem;
}

.mini-calendar button em {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: .56rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-calendar button.has-performance small {
  background: var(--violet);
}

.activity-calendar-panel {
  margin-top: 16px;
  padding: 16px;
}

.activity-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.activity-calendar > span,
.activity-calendar > button {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 76px;
  align-content: start;
  justify-items: center;
  border: 0;
  border-radius: 8px;
  padding: 8px 4px;
  color: #5b6e89;
  background: rgba(255, 255, 255, .72);
  font-weight: 800;
}

.activity-calendar .weekday {
  min-height: 28px;
  align-content: center;
  color: #718198;
  background: transparent;
  font-size: .86rem;
}

.activity-calendar .weekday.sunday {
  color: #bc5d72;
}

.activity-calendar .weekday.saturday {
  color: #4186a8;
}

.activity-calendar .empty-day {
  background: transparent;
}

.activity-calendar button.sunday,
.activity-calendar button.holiday {
  background: rgba(255, 239, 243, .82);
}

.activity-calendar button.saturday {
  background: rgba(229, 248, 253, .86);
}

.activity-calendar button.has-activity {
  box-shadow: inset 0 0 0 1px rgba(56, 196, 207, .25);
}

.activity-calendar button em {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: .56rem;
  font-style: normal;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-day-labels {
  display: grid;
  gap: 3px;
  width: 100%;
}

.activity-day-labels i {
  overflow: hidden;
  border-radius: 999px;
  padding: 2px 5px;
  color: #fff;
  font-size: .58rem;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-day-labels .show,
.activity-icon.show {
  background: linear-gradient(100deg, #35bfca, #9d86ee);
}

.activity-day-labels .contest,
.activity-icon.contest {
  background: linear-gradient(100deg, #7762d8, #d49adf);
}

.activity-day-labels .practice,
.activity-icon.practice {
  background: linear-gradient(100deg, #58c9d0, #9fdfe2);
}

.activity-day-labels .class,
.activity-icon.class {
  background: linear-gradient(100deg, #7ea9d8, #b4c7ee);
}

.activity-day-labels .photo,
.activity-icon.photo {
  background: linear-gradient(100deg, #6aaad7, #8bd5c8);
}

.activity-day-labels .other,
.activity-icon.other {
  background: linear-gradient(100deg, #9aa9bd, #c5cfdd);
}

.calendar-sync {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 12px;
  background: rgba(255, 255, 255, .72);
}

.calendar-sync:empty {
  display: none;
}

.calendar-sync-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-sync h3,
.calendar-sync p {
  margin: 0;
}

.calendar-sync h3 {
  color: #263653;
  font-size: .96rem;
}

.calendar-sync p {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.calendar-sync-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  color: #7a6c7a;
  background: rgba(240, 234, 242, .9);
  font-size: .78rem;
  font-weight: 900;
}

.calendar-sync-head span.on {
  color: #177681;
  background: rgba(217, 249, 252, .9);
}

.calendar-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#activities .calendar-sync {
  margin: 14px 0 4px;
}

#activities .calendar-sync-actions .secondary-small {
  min-width: 118px;
}

.schedule-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 12px;
  background: rgba(255, 255, 255, .7);
}

.schedule-row b {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #268895;
  background: #fff;
}

.schedule-row em {
  border-radius: 999px;
  padding: 7px 10px;
  color: #47818c;
  font-style: normal;
  font-weight: 800;
  background: rgba(217, 249, 252, .9);
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.schedule-item > b {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #268895;
  background: #fff;
}

.schedule-item.performance > b {
  color: #fff;
  background: linear-gradient(135deg, var(--aqua), var(--violet));
}

.schedule-item strong,
.schedule-item small {
  display: block;
}

.schedule-item small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.schedule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0 6px;
}

.schedule-tags i {
  border-radius: 999px;
  padding: 4px 8px;
  color: #55708c;
  background: rgba(255, 255, 255, .72);
  font-style: normal;
  font-size: .78rem;
  font-weight: 900;
}

.schedule-tags i.live {
  color: #fff;
  background: linear-gradient(100deg, var(--aqua), var(--violet));
}

.calendar-day-menu {
  display: grid;
  gap: 14px;
}

.calendar-day-menu p {
  margin: 0;
  color: #52657f;
  line-height: 1.6;
}

.calendar-day-options {
  display: grid;
  gap: 10px;
}

.calendar-day-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  background: rgba(255, 255, 255, .82);
}

.calendar-day-option strong,
.calendar-day-option small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-option small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 800;
}

.calendar-day-option .activity-tag {
  grid-row: 1 / span 2;
  border-radius: 999px;
  padding: 6px 9px;
  color: #fff;
  background: linear-gradient(100deg, var(--aqua), var(--violet));
  font-size: .78rem;
  font-weight: 900;
}

.calendar-day-option .activity-tag.practice {
  background: linear-gradient(100deg, #58c9d0, #9fdfe2);
}

.calendar-day-option .activity-tag.class {
  background: linear-gradient(100deg, #7ea9d8, #b4c7ee);
}

.calendar-day-option .activity-tag.photo {
  background: linear-gradient(100deg, #6aaad7, #8bd5c8);
}

.profile-edit-head {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 20px;
  margin-bottom: 12px;
}

.avatar-wrap {
  position: relative;
}

.avatar-wrap .round-button {
  position: absolute;
  right: 10px;
  bottom: 4px;
  width: 44px;
  height: 44px;
  color: #53718f;
}

.profile-copy p {
  margin: 0 0 12px;
  line-height: 1.7;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-grid .panel,
.ai-panel,
.timeline-panel,
.profile-assets-panel,
.template-panel,
.page-settings-panel {
  padding: 18px;
}

.panel.wide,
.info-grid .wide {
  grid-column: 1 / -1;
}

.chips,
.badge-row,
.sns-row,
.thumbnail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.panel p,
.panel ul,
.panel-body {
  margin: 12px 0 0;
  color: #40506a;
  line-height: 1.75;
}

.panel ul {
  padding-left: 1.1rem;
}

.panel-body ul {
  margin: 0;
}

.contact-panel p,
.contact-panel .panel-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dual-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tabs button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  white-space: nowrap;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 8px 16px rgba(70, 102, 132, .08);
  color: #4f6683;
  font-weight: 800;
}

.tabs button.active {
  color: #fff;
  background: linear-gradient(100deg, var(--violet), var(--aqua));
}

.activity-list,
.item-grid,
.gallery-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.activity-list {
  max-width: 660px;
  margin-right: auto;
  margin-left: auto;
}

.activity-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
}

.activity-card.no-media {
  grid-template-columns: 96px minmax(0, 1fr);
}

.activity-list-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 2px;
  color: #6b7c95;
  font-size: .86rem;
  font-weight: 900;
}

.activity-list-divider::before,
.activity-list-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(118, 159, 184, .32);
}

.activity-card.performance {
  box-shadow: 0 14px 30px rgba(111, 91, 164, .16);
  outline: 2px solid rgba(182, 139, 234, .25);
  outline-offset: -2px;
}

.activity-card img {
  width: 96px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #edf9fb;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 1;
  border-radius: 8px;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 10px 22px rgba(55, 93, 128, .13);
}

.activity-icon svg {
  width: 36px;
  height: 36px;
  stroke-width: 1.8;
}

.activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.activity-meta small {
  color: var(--muted);
  font-weight: 800;
}

.activity-card h3,
.item-card h3 {
  margin: 8px 0;
}

.activity-card h3 {
  font-size: 1.05rem;
}

.item-card h3 {
  font-size: 1.2rem;
}

.activity-card p,
.item-card p {
  margin: 6px 0;
  color: #50627d;
  font-size: .9rem;
  line-height: 1.5;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: #466074;
  font-weight: 800;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: .18s ease;
}

.switch span::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: .18s ease;
}

.switch input:checked + span {
  background: var(--aqua);
}

.switch input:checked + span::before {
  transform: translateX(20px);
}

.item-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.item-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 12px;
  position: relative;
}

.item-card img {
  width: 132px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #edf9fb;
}

.item-card .more {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .78);
}

.summary-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px;
}

.summary-panel strong {
  display: block;
  color: #1e3455;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 500;
}

.summary-panel ol {
  margin: 8px 0 0;
  padding-left: 1.3rem;
  color: #51617a;
}

.gallery-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
}

.gallery-summary .big-count {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gallery-summary .big-count span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--aqua);
  background: rgba(230, 251, 253, .9);
}

.gallery-summary strong {
  display: block;
  color: #1e3455;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-tile {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #edf9fb;
  box-shadow: 0 8px 16px rgba(70, 102, 132, .12);
  cursor: zoom-in;
  -webkit-touch-callout: none;
  user-select: none;
}

.gallery-tile img {
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: cover;
}

.gallery-tile:nth-child(4n + 1) {
  grid-row: span 2;
}

.gallery-tile:nth-child(4n + 1) img {
  aspect-ratio: .78;
}

.gallery-tile button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #6a7d99;
  background: rgba(255, 255, 255, .9);
  cursor: pointer;
}

.gallery-tile.selected {
  outline: 3px solid rgba(56, 196, 207, .75);
  outline-offset: -3px;
}

.gallery-tile.selected button {
  color: #fff;
  background: var(--aqua);
}

.bulk-bar {
  position: sticky;
  bottom: 92px;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, .94);
}

.bulk-bar button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  min-height: 58px;
  border: 0;
  background: transparent;
  color: #50627d;
  font-weight: 800;
}

.history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.pdf-preview-panel {
  position: relative;
  padding: 16px;
}

.preview-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  margin-bottom: 8px;
  padding: 6px 10px;
  color: #6f7f9b;
  background: rgba(255, 255, 255, .7);
  font-size: .86rem;
  font-weight: 800;
}

.pdf-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  grid-auto-rows: min-content;
  gap: 12px 18px;
  overflow: hidden;
  min-height: 360px;
  border-radius: 8px;
  padding: 20px;
  background: linear-gradient(160deg, #f8fdff 0%, #eefbff 58%, #fbf6ff 100%);
  box-shadow: inset 0 0 0 1px rgba(107, 154, 184, .22);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.pdf-page[data-template="deep_sea"],
.pdf-page[data-template="deep_ocean"] {
  color: #e9fbff;
  background:
    radial-gradient(circle at 84% 8%, rgba(164, 225, 237, .22), transparent 28%),
    linear-gradient(155deg, #0a425d 0%, #0f637b 46%, #082846 100%);
  box-shadow: inset 0 0 0 1px rgba(171, 239, 246, .28);
}

.pdf-page[data-template="siren_luxury"],
.pdf-page[data-template="twilight_luxury"] {
  color: #fff8e8;
  background:
    radial-gradient(circle at 86% 10%, rgba(255, 222, 165, .34), transparent 26%),
    linear-gradient(150deg, #5b466f 0%, #c58b88 52%, #523a72 100%);
  box-shadow: inset 0 0 0 1px rgba(231, 204, 143, .34);
}

.pdf-page[data-template="human"] {
  color: #172235;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #b9c2d0;
}

.pdf-photo-collage {
  grid-column: 1;
  grid-row: 1 / span 3;
  display: grid;
  align-self: stretch;
  gap: 3px;
  min-height: 300px;
  height: 100%;
  max-height: 430px;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
}

.pdf-page[data-template="deep_sea"] .pdf-photo-collage,
.pdf-page[data-template="deep_ocean"] .pdf-photo-collage {
  background: transparent;
  box-shadow: none;
}

.pdf-page[data-template="siren_luxury"] .pdf-photo-collage,
.pdf-page[data-template="twilight_luxury"] .pdf-photo-collage,
.pdf-page[data-template="human"] .pdf-photo-collage {
  background: transparent;
  box-shadow: none;
}

.pdf-photo-collage img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 4px;
  object-fit: contain;
  background: rgba(255, 255, 255, .16);
}

.pdf-photo-collage.count-1 {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.pdf-photo-collage.count-2 {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.pdf-photo-collage.count-3 {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.pdf-photo-collage.count-3 img:first-child {
  grid-row: 1 / span 2;
}

.pdf-photo-collage.count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.pdf-photo-collage.count-5 {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.pdf-photo-collage.count-5 img:first-child {
  grid-row: 1 / span 4;
}

.pdf-page h3 {
  grid-column: 2;
  position: relative;
  z-index: 1;
  margin: 0 96px 0 0;
  color: #203657;
  font-size: .9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pdf-page[data-template="deep_sea"] h3,
.pdf-page[data-template="deep_sea"] .pdf-name,
.pdf-page[data-template="deep_sea"] .pdf-block,
.pdf-page[data-template="deep_ocean"] h3,
.pdf-page[data-template="deep_ocean"] .pdf-name,
.pdf-page[data-template="deep_ocean"] .pdf-block {
  color: #f3fdff;
}

.pdf-page[data-template="siren_luxury"] h3,
.pdf-page[data-template="siren_luxury"] .pdf-name,
.pdf-page[data-template="siren_luxury"] .pdf-block,
.pdf-page[data-template="twilight_luxury"] h3,
.pdf-page[data-template="twilight_luxury"] .pdf-name,
.pdf-page[data-template="twilight_luxury"] .pdf-block {
  color: #4f353a;
}

.pdf-page[data-template="human"] h3,
.pdf-page[data-template="human"] .pdf-name,
.pdf-page[data-template="human"] .pdf-block {
  color: #172235;
}

.pdf-page .pdf-name {
  grid-column: 2;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  margin: 4px 96px 18px 0;
  color: #203657;
}

.pdf-page .pdf-mermaid-name {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1.04;
  font-weight: 500;
}

.pdf-page .pdf-real-name {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
}

.pdf-page[data-template="deep_sea"] .pdf-real-name,
.pdf-page[data-template="deep_ocean"] .pdf-real-name {
  color: #b6e3ea;
}

.pdf-page[data-template="siren_luxury"] .pdf-real-name,
.pdf-page[data-template="twilight_luxury"] .pdf-real-name {
  color: #704e54;
}

.pdf-page[data-template="human"] .pdf-real-name {
  color: #64748b;
}

.pdf-page[data-template="deep_sea"] .pdf-block h4,
.pdf-page[data-template="deep_sea"] .pdf-block p,
.pdf-page[data-template="deep_sea"] .pdf-block li,
.pdf-page[data-template="deep_sea"] .pdf-contact-row b,
.pdf-page[data-template="deep_ocean"] .pdf-block h4,
.pdf-page[data-template="deep_ocean"] .pdf-block p,
.pdf-page[data-template="deep_ocean"] .pdf-block li,
.pdf-page[data-template="deep_ocean"] .pdf-contact-row b {
  color: #f3fdff;
}

.pdf-page[data-template="deep_sea"] .pdf-block h4,
.pdf-page[data-template="deep_ocean"] .pdf-block h4 {
  color: #bff6ff;
}

.pdf-page[data-template="siren_luxury"] .pdf-block h4,
.pdf-page[data-template="siren_luxury"] .pdf-block p,
.pdf-page[data-template="siren_luxury"] .pdf-block li,
.pdf-page[data-template="siren_luxury"] .pdf-contact-row b,
.pdf-page[data-template="twilight_luxury"] .pdf-block h4,
.pdf-page[data-template="twilight_luxury"] .pdf-block p,
.pdf-page[data-template="twilight_luxury"] .pdf-block li,
.pdf-page[data-template="twilight_luxury"] .pdf-contact-row b {
  color: #4f353a;
}

.pdf-page[data-template="siren_luxury"] .pdf-block h4,
.pdf-page[data-template="twilight_luxury"] .pdf-block h4 {
  color: #8c5746;
}

.pdf-page[data-template="human"] .pdf-block h4,
.pdf-page[data-template="human"] .pdf-block p,
.pdf-page[data-template="human"] .pdf-block li,
.pdf-page[data-template="human"] .pdf-contact-row b {
  color: #172235;
}

.pdf-page[data-template="human"] .pdf-block h4 {
  color: #2f5f94;
}

.pdf-page[data-template="deep_ocean"] .pdf-contact-row > span,
.pdf-page[data-template="deep_sea"] .pdf-contact-row > span {
  color: #0b2a42;
  background: rgba(232, 250, 255, .94);
}

.pdf-page[data-template="deep_ocean"] .qr span,
.pdf-page[data-template="deep_sea"] .qr span {
  color: #203657;
}

.pdf-page .pdf-block {
  grid-column: 2;
  position: relative;
  z-index: 1;
  margin-left: 0;
  border-radius: 8px;
  padding: 0 2px 0 0;
  background: transparent;
}

.pdf-contact {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.pdf-contact h4 {
  margin-bottom: 1px;
}

.pdf-contact-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  line-height: 1.25;
}

.pdf-contact-row > span {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--aqua), var(--violet));
  font-size: .72rem;
  font-weight: 900;
}

.pdf-contact-row svg {
  width: 14px;
  height: 14px;
}

.pdf-contact-row b {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-contact-row.instagram > span {
  background: linear-gradient(135deg, #f1a7c4, #b59ee7 54%, #85d7df);
}

.pdf-contact-row.tiktok > span,
.pdf-contact-row.x > span {
  background: #eef9fb;
  color: #203657;
}

.pdf-contact-row.website > span {
  background: rgba(88, 174, 183, .22);
  color: #277d89;
}

.pdf-page .qr {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 92px;
  height: 108px;
  margin-left: auto;
  color: #263653;
  font-size: .7rem;
  font-weight: 800;
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: inset 0 0 0 1px rgba(107, 154, 184, .18);
}

.pdf-page[data-template="deep_sea"] .qr,
.pdf-page[data-template="deep_ocean"] .qr {
  background: rgba(237, 252, 255, .94);
  box-shadow: inset 0 0 0 1px rgba(122, 205, 219, .36);
}

.pdf-page[data-template="siren_luxury"] .qr,
.pdf-page[data-template="twilight_luxury"] .qr {
  background: rgba(255, 250, 238, .94);
  box-shadow: inset 0 0 0 1px rgba(224, 195, 128, .42);
}

.pdf-page[data-template="human"] .qr {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}

.pdf-page .qr img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.pdf-page .qr span {
  color: #60718e;
  font-size: .62rem;
  line-height: 1;
}

.pdf-page[data-orientation] {
  display: block;
  min-height: 0;
  padding: 0;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: inset 0 0 0 1px rgba(107, 154, 184, .22);
}

.pdf-page[data-orientation="portrait"] {
  aspect-ratio: 1055 / 1491;
}

.pdf-page[data-orientation="landscape"] {
  aspect-ratio: 1491 / 1055;
}

.pdf-page[data-template="pearl_white"][data-orientation="portrait"] {
  background-image: url("assets/pdf-template-portrait-pearl-white.png");
}

.pdf-page[data-template="deep_ocean"][data-orientation="portrait"] {
  background-image: url("assets/pdf-template-portrait-deep-ocean.png");
}

.pdf-page[data-template="twilight_luxury"][data-orientation="portrait"] {
  background-image: url("assets/pdf-template-portrait-twilight-luxury.png");
}

.pdf-page[data-template="human"][data-orientation="portrait"] {
  background-image: url("assets/pdf-template-portrait-human.png");
}

.pdf-page[data-template="pearl_white"][data-orientation="landscape"] {
  background-image: url("assets/pdf-template-landscape-pearl-white.png");
}

.pdf-page[data-template="deep_ocean"][data-orientation="landscape"] {
  background-image: url("assets/pdf-template-landscape-deep-ocean.png");
}

.pdf-page[data-template="twilight_luxury"][data-orientation="landscape"] {
  background-image: url("assets/pdf-template-landscape-twilight-luxury.png");
}

.pdf-page[data-template="human"][data-orientation="landscape"] {
  background-image: url("assets/pdf-template-landscape-human.png");
}

.pdf-page[data-orientation] .pdf-photo-collage,
.pdf-page[data-orientation] .pdf-name,
.pdf-page[data-orientation] .pdf-block,
.pdf-page[data-orientation] .pdf-contact,
.pdf-page[data-orientation] .qr {
  position: absolute;
  z-index: 1;
  margin: 0;
}

.pdf-page[data-orientation] .pdf-photo-collage {
  min-height: 0;
  max-height: none;
  gap: 0;
  border-radius: 8px;
}

.pdf-page[data-orientation] .pdf-photo-collage img {
  border-radius: 6px;
  object-fit: cover;
  object-position: var(--pdf-photo-position, center center);
  background: transparent;
}

.pdf-page[data-orientation] .pdf-name {
  display: grid;
  gap: 3px;
}

.pdf-page[data-orientation] .pdf-mermaid-name {
  font-size: 1.65rem;
  line-height: 1.05;
}

.pdf-page[data-orientation] .pdf-real-name {
  font-size: .76rem;
}

.pdf-page[data-orientation] .pdf-block {
  overflow: hidden;
  padding: 0;
  font-size: .68rem;
  line-height: 1.55;
}

.pdf-page[data-orientation] .pdf-block p,
.pdf-page[data-orientation] .pdf-block ul {
  margin: 0;
}

.pdf-page[data-orientation] .pdf-block ul {
  padding-left: 1.1em;
}

.pdf-page[data-orientation] .pdf-block li {
  margin: 0 0 .18em;
}

.pdf-page[data-orientation] .pdf-contact {
  gap: 2px;
  overflow: hidden;
}

.pdf-page[data-orientation] .pdf-contact-row {
  gap: 4px;
  line-height: 1.16;
}

.pdf-page[data-orientation] .pdf-contact-row > span {
  width: 17px;
  height: 17px;
  font-size: .58rem;
}

.pdf-page[data-orientation] .pdf-contact-row svg {
  width: 11px;
  height: 11px;
}

.pdf-page[data-orientation] .pdf-contact-row b {
  font-size: .62rem;
}

.pdf-page[data-orientation] .qr {
  display: grid;
  width: auto;
  height: auto;
  padding: 3%;
  background: transparent;
  box-shadow: none;
}

.pdf-page[data-orientation] .qr img {
  width: 100%;
  height: 100%;
}

.pdf-page[data-orientation] .qr span {
  display: none;
}

.pdf-page[data-orientation="portrait"] .pdf-photo-collage {
  left: 48%;
  top: 7.5%;
  width: 44%;
  height: 49.5%;
}

.pdf-page[data-orientation="portrait"] .pdf-name {
  left: 13%;
  top: 12%;
  width: 31%;
}

.pdf-page[data-orientation="portrait"] .pdf-about {
  left: 7.5%;
  top: 37%;
  width: 35%;
  height: 20.5%;
}

.pdf-page[data-orientation="portrait"] .pdf-skills {
  left: 8%;
  top: 66%;
  width: 36%;
  height: 10.5%;
}

.pdf-page[data-orientation="portrait"] .pdf-licenses {
  left: 50%;
  top: 66%;
  width: 30%;
  height: 10.5%;
}

.pdf-page[data-orientation="portrait"] .pdf-contact {
  left: 8%;
  top: 84%;
  width: 40%;
  height: 10.5%;
}

.pdf-page[data-orientation="portrait"] .qr {
  left: 53%;
  top: 82%;
  width: 15%;
  height: 11.5%;
}

.pdf-page[data-orientation="landscape"] .pdf-photo-collage {
  left: 63.5%;
  top: 10%;
  width: 30.5%;
  height: 75%;
}

.pdf-page[data-orientation="landscape"] .pdf-name {
  left: 21%;
  top: 14%;
  width: 34%;
}

.pdf-page[data-orientation="landscape"] .pdf-about {
  left: 4.5%;
  top: 45%;
  width: 29%;
  height: 22%;
}

.pdf-page[data-orientation="landscape"] .pdf-skills {
  left: 37%;
  top: 45%;
  width: 23.5%;
  height: 22%;
}

.pdf-page[data-orientation="landscape"] .pdf-licenses {
  left: 8%;
  top: 79%;
  width: 20%;
  height: 11%;
}

.pdf-page[data-orientation="landscape"] .pdf-contact {
  left: 33%;
  top: 79%;
  width: 19.5%;
  height: 11%;
}

.pdf-page[data-orientation="landscape"] .qr {
  left: 52%;
  top: 77%;
  width: 10%;
  height: 13%;
}

.pdf-page[data-template="deep_ocean"][data-orientation] .pdf-name,
.pdf-page[data-template="deep_ocean"][data-orientation] .pdf-block,
.pdf-page[data-template="deep_ocean"][data-orientation] .pdf-contact-row b {
  color: #f3fdff;
}

.pdf-page[data-template="deep_ocean"][data-orientation] .pdf-real-name {
  color: #b6e3ea;
}

.pdf-page[data-template="twilight_luxury"][data-orientation] .pdf-name,
.pdf-page[data-template="twilight_luxury"][data-orientation] .pdf-block,
.pdf-page[data-template="twilight_luxury"][data-orientation] .pdf-contact-row b {
  color: #4f353a;
}

.pdf-page[data-template="twilight_luxury"][data-orientation] .pdf-real-name {
  color: #704e54;
}

.pdf-page[data-template="human"][data-orientation] .pdf-name,
.pdf-page[data-template="human"][data-orientation] .pdf-block,
.pdf-page[data-template="human"][data-orientation] .pdf-contact-row b {
  color: #172235;
}

@media screen {
  #history .history-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  #history .history-layout > .panel {
    min-width: 0;
  }

  #history .pdf-preview-panel {
    overflow: visible;
  }

  #history .pdf-page {
    display: block;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    max-height: none;
    overflow: visible;
    gap: 10px;
  }

  #history .pdf-photo-collage,
  #history .pdf-page h3,
  #history .pdf-page .pdf-name,
  #history .pdf-page .pdf-block {
    grid-column: 1;
  }

  #history .pdf-photo-collage {
    display: grid;
    grid-row: auto;
    width: 100%;
    min-height: 0;
    height: auto;
    max-height: none;
    margin-bottom: 10px;
    aspect-ratio: 16 / 10;
  }

  #history .pdf-page h3,
  #history .pdf-page .pdf-name {
    margin-right: 0;
  }

  #history .pdf-page .pdf-block {
    display: block;
    max-height: none;
    overflow: visible;
  }

  #history .pdf-page .qr {
    margin-left: 0;
  }

  #history .pdf-contact-row b {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.pdf-viewer-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(160deg, rgba(238, 251, 255, .98), rgba(247, 241, 255, .98));
}

.pdf-viewer-screen[hidden] {
  display: none !important;
}

body.pdf-viewer-open {
  overflow: hidden;
}

.pdf-viewer-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 8px;
  width: min(980px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(150, 192, 210, .42);
  border-radius: 18px;
  padding: 8px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 16px 36px rgba(67, 112, 145, .2);
}

.pdf-viewer-toolbar .primary-cta,
.pdf-viewer-toolbar .secondary-cta {
  height: 100%;
  min-width: 0;
}

.pdf-frame {
  display: block;
  width: min(980px, 100%);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  border: 1px solid rgba(150, 192, 210, .42);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(67, 112, 145, .22);
}

.page-count {
  display: block;
  width: max-content;
  margin: 10px auto 0;
  border-radius: 999px;
  padding: 6px 14px;
  background: #fff;
  color: #6b7e98;
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  position: relative;
  padding-bottom: 14px;
}

.timeline-row::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 35px;
  bottom: -2px;
  width: 2px;
  background: rgba(97, 128, 158, .24);
}

.timeline-row:last-child::before {
  display: none;
}

.timeline-row.performance b {
  color: #fff;
  background: linear-gradient(135deg, var(--aqua), var(--violet));
}

.timeline-row b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 34px;
  border-radius: 999px;
  color: #4f7892;
  background: #fff;
  box-shadow: 0 6px 14px rgba(65, 102, 138, .12);
}

.timeline-row h3 {
  margin: 4px 0 4px;
}

.timeline-row p {
  margin: 0;
}

.thumbnail-row img {
  width: 76px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #edf9fb;
}

.badge-row span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #6b7e98;
  background: linear-gradient(140deg, rgba(215, 248, 251, .8), rgba(247, 231, 255, .8));
  font-weight: 900;
}

.sns-row a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #4b637e;
  background: #fff;
  text-decoration: none;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 8px 18px rgba(74, 111, 145, .14);
}

.sns-row a svg {
  width: 24px;
  height: 24px;
}

.sns-row a.instagram svg {
  width: 26px;
  height: 26px;
}

.sns-row a.instagram rect,
.sns-row a.instagram circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.sns-row a.instagram {
  color: #fff;
  background:
    radial-gradient(circle at 28% 105%, rgba(255, 213, 132, .95) 0 22%, rgba(241, 166, 143, .72) 34%, transparent 42%),
    linear-gradient(135deg, #8ea7ef 0%, #b990e7 38%, #df8bb8 72%, #f1a68f 100%);
}

.sns-row a.tiktok {
  color: #fff;
  background: linear-gradient(145deg, #24304c 0%, #2b4260 100%);
}

.sns-row a.tiktok path {
  fill: currentColor;
}

.sns-row a.tiktok .tone-a {
  fill: #8de8ee;
  transform: translate(-1px, 1px);
}

.sns-row a.tiktok .tone-b {
  fill: #f4a8c7;
  transform: translate(1px, -1px);
}

.sns-row a.x {
  color: #fff;
  background: linear-gradient(145deg, #26334e 0%, #435271 100%);
}

.sns-row a.x path {
  fill: currentColor;
}

.sns-row a.website {
  color: #fff;
  background: linear-gradient(145deg, #56c7cc 0%, #8fa8ef 100%);
}

.sns-row a.website circle,
.sns-row a.website path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.template-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.template-card {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 78px;
  border: 1px solid rgba(93, 174, 183, .45);
  border-radius: 8px;
  color: #6c7896;
  font-family: var(--font-display);
  font-weight: 800;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #ffffff, #e7fbfd 48%, #f8e8ff);
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 16px rgba(70, 102, 132, .09);
  cursor: pointer;
}

.template-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .72));
}

.template-card small {
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 900;
}

.template-card.pearl {
  color: #273957;
  background-image: url("assets/skin-thumb-pearl-white.png");
  text-shadow: 0 1px 0 rgba(255, 255, 255, .75);
}

.template-card.deep {
  color: #f3fdff;
  background-image: url("assets/skin-thumb-deep-ocean.png");
  text-shadow: 0 1px 2px rgba(0, 19, 34, .62);
}

.template-card.deep::before {
  background: linear-gradient(180deg, rgba(2, 22, 38, .1), rgba(3, 18, 31, .64));
}

.template-card.luxe,
.template-card.twilight {
  color: #fffaf0;
  background-image: url("assets/skin-thumb-twilight-luxury.png");
  text-shadow: 0 1px 2px rgba(20, 12, 35, .62);
}

.template-card.luxe::before,
.template-card.twilight::before {
  background: linear-gradient(180deg, rgba(62, 35, 58, .08), rgba(56, 33, 61, .58));
}

.template-card.human {
  color: #243044;
  background-image: url("assets/skin-thumb-human.png");
  border-color: #cbd5e1;
  font-family: Georgia, "Times New Roman", serif;
}

.template-card.human::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .8));
}

.template-card.active {
  outline: 3px solid rgba(56, 196, 207, .8);
  outline-offset: -3px;
}

.template-card.luxe.active,
.template-card.twilight.active {
  outline-color: rgba(231, 205, 144, .9);
}

.template-card.deep.active {
  outline-color: rgba(176, 245, 255, .9);
}

.template-card.human.active {
  outline-color: rgba(47, 95, 148, .65);
}

@media (max-width: 520px) {
  .template-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.page-settings-panel button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: #4c5f7b;
  font-weight: 800;
}

.page-settings-panel h2 + button {
  margin-top: 8px;
}

.created-date {
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: min(calc(100% - 32px), 704px);
  min-height: 78px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 36px rgba(56, 84, 112, .22);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 62px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #65758f;
  font-size: .78rem;
  font-weight: 800;
}

.bottom-nav button.active {
  color: #1baeb8;
  background: rgba(238, 253, 255, .9);
  box-shadow: 0 8px 18px rgba(68, 154, 177, .12);
}

.bottom-nav svg {
  width: 25px;
  height: 25px;
}

.bottom-ad {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 14px);
  z-index: 8;
  width: min(calc(100% - 32px), 704px);
  height: var(--bottom-ad-height);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 22px rgba(56, 84, 112, .12);
}

.bottom-ad.no-ad,
.bottom-ad[hidden] {
  display: none;
}

.bottom-ad .adsbygoogle {
  max-width: 100%;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(28, 45, 69, .38);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(100%, 640px);
  max-height: min(86vh, 760px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  background: rgba(255, 255, 255, .96);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-head .round-button {
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
}

.notification-center {
  display: grid;
  gap: 14px;
}

.notification-status,
.notification-history-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px;
  background: rgba(248, 253, 255, .78);
}

.notification-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.notification-status h3,
.notification-status p,
.notification-history-panel h3 {
  margin: 0;
}

.notification-status p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.notification-history-list {
  display: grid;
  gap: 10px;
  max-height: 46vh;
  overflow: auto;
  padding-right: 2px;
}

.notification-history-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(118, 159, 184, .2);
  border-radius: var(--radius-card);
  padding: 10px;
  background: rgba(255, 255, 255, .82);
}

.notification-history-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #178a96;
  background: linear-gradient(140deg, rgba(215, 248, 251, .9), rgba(247, 231, 255, .9));
}

.notification-history-item.pdf .notification-history-icon {
  color: #7460c8;
}

.notification-history-item small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.notification-history-item strong {
  display: block;
  margin-top: 2px;
  color: #203657;
}

.notification-history-item p {
  margin: 4px 0 8px;
  color: #52637c;
  line-height: 1.45;
}

.empty-state.compact {
  min-height: 76px;
  padding: 18px;
}

.gallery-preview,
.gallery-action-sheet {
  display: grid;
  gap: 14px;
}

.gallery-preview img {
  width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  object-fit: contain;
  background: #eef9fb;
}

.gallery-preview-meta {
  display: grid;
  gap: 4px;
  color: #5f718d;
}

.gallery-preview-meta strong,
.gallery-action-sheet strong {
  color: #1e3455;
  font-size: 1rem;
}

.gallery-action-sheet img {
  width: 100%;
  max-height: 280px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef9fb;
}

.gallery-action-sheet p {
  margin: 0;
  color: #65758f;
  font-size: .92rem;
}

.tutorial-panel {
  display: grid;
  gap: 14px;
}

.tutorial-never {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(93, 174, 183, .24);
  border-radius: 8px;
  padding: 12px;
  color: #263653;
  background: rgba(244, 251, 255, .92);
  font-weight: 900;
}

.tutorial-never input {
  width: 20px;
  height: 20px;
  accent-color: #29b8c0;
}

.tutorial-lead {
  margin: 0;
  color: #5f718d;
  line-height: 1.7;
}

.tutorial-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tutorial-slide {
  flex: 0 0 100%;
  min-width: 100%;
  margin: 0;
  scroll-snap-align: start;
}

.tutorial-slide img {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: min(68vh, 660px);
  border-radius: 8px;
  object-fit: contain;
  background: rgba(244, 251, 255, .88);
  box-shadow: 0 12px 26px rgba(48, 79, 112, .14);
}

.tutorial-slide figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.tutorial-steps {
  display: grid;
  gap: 10px;
}

.tutorial-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(93, 174, 183, .18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .82);
}

.tutorial-step-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #1baeb8;
  background: linear-gradient(135deg, rgba(225, 251, 252, .94), rgba(247, 239, 255, .94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .82);
}

.tutorial-step-icon svg {
  width: 24px;
  height: 24px;
}

.tutorial-step strong {
  display: block;
  margin: 0 0 4px;
  color: #1e3455;
}

.tutorial-step p {
  margin: 0;
  color: #65758f;
  line-height: 1.6;
  font-size: .92rem;
}

.tutorial-actions {
  margin-top: 4px;
}

.avatar-upload-preview {
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(93, 174, 183, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.avatar-upload-preview img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(55, 93, 128, .18);
}

.item-image-picker {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(93, 174, 183, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.item-image-picker img {
  width: 112px;
  height: 112px;
  border-radius: 8px;
  object-fit: cover;
  background: #edf9fb;
  box-shadow: 0 8px 18px rgba(55, 93, 128, .13);
}

.item-image-picker label {
  margin: 0;
}

.activity-image-picker {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(93, 174, 183, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.activity-image-preview {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 8px;
  color: #58aeb7;
  background: #edf9fb;
  box-shadow: 0 8px 18px rgba(55, 93, 128, .13);
}

.activity-image-picker.no-image {
  grid-template-columns: minmax(0, 1fr);
}

.activity-image-picker.no-image .activity-image-preview {
  display: none;
}

.activity-image-preview img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.activity-image-preview svg {
  width: 44px;
  height: 44px;
}

.activity-image-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.activity-image-controls label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.activity-image-controls input[type="file"] {
  display: none;
}

.activity-image-controls small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.form-grid > *,
.field-row,
.field-row > *,
.input-with-action,
.input-with-action > *,
.item-image-picker,
.activity-image-picker {
  min-width: 0;
  max-width: 100%;
}

.form-grid label {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  color: #485a76;
  font-weight: 800;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.field-row > label {
  grid-template-rows: auto minmax(48px, auto);
  min-width: 0;
}

.time-picker-field,
.native-time-field,
.compact-date-field,
.compact-time-field {
  grid-template-rows: auto minmax(48px, auto);
  overflow: hidden;
}

.native-time-field input[type="time"] {
  -webkit-appearance: auto;
  appearance: auto;
  min-height: 48px;
}

.compact-date-field input,
.compact-time-field select {
  -webkit-appearance: none;
  appearance: none;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.compact-time-field select {
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7e98 50%),
    linear-gradient(135deg, #6b7e98 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.input-with-action .secondary-small {
  min-width: 64px;
  min-height: 48px;
  border-radius: 8px;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #2f8d9b;
  font-weight: 800;
  text-decoration: none;
}

.map-link svg {
  width: 15px;
  height: 15px;
}

.map-link.empty {
  color: var(--muted);
}

.time-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.form-grid label.field-disabled {
  opacity: .58;
}

.form-grid input,
.form-grid textarea,
.form-grid select,
.setup-form input,
.manual-config textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: #263653;
  background: rgba(255, 255, 255, .92);
  outline: none;
}

.form-grid input,
.form-grid select {
  height: 48px;
  min-height: 48px;
  min-width: 0;
}

.form-grid input[type="date"],
.form-grid input[type="time"] {
  display: block;
  height: 48px;
  min-height: 48px;
  min-width: 0;
  max-width: 100%;
  line-height: normal;
}

.form-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.form-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.form-actions .primary-cta,
.form-actions .secondary-cta,
.form-actions .danger-cta {
  width: auto;
  min-width: 132px;
}

#activity-form {
  gap: 9px;
}

#activity-form .field-row {
  gap: 9px;
}

#activity-form .date-range-row,
#activity-form .time-range-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

#activity-form textarea {
  min-height: 82px;
}

#activity-form .activity-image-picker {
  padding: 10px;
}

#activity-form .activity-image-picker.no-image {
  grid-template-columns: minmax(0, 1fr);
}

#activity-form .activity-image-preview {
  width: 112px;
  height: 112px;
}

.account-actions {
  align-items: center;
  flex-wrap: wrap;
}

.account-bottom-action {
  display: grid;
  margin-top: 4px;
}

.account-bottom-action .secondary-cta {
  width: 100%;
}

.account-role {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(244, 251, 255, .86);
}

.account-role span {
  color: #176a76;
  font-weight: 900;
}

.account-role small {
  color: var(--muted);
  line-height: 1.5;
}

.app-background-picker {
  display: grid;
  gap: 14px;
}

.app-design-picker {
  gap: 12px;
}

.design-setting-block {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .62);
}

.design-setting-block h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.background-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.background-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 20px rgba(65, 102, 138, .12);
}

.background-card.active {
  border-color: rgba(56, 196, 207, .72);
  box-shadow: 0 0 0 3px rgba(56, 196, 207, .18), 0 10px 22px rgba(65, 102, 138, .14);
}

.background-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 14;
  border-radius: 8px;
  background-position: center top;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(118, 159, 184, .22);
}

.background-thumb.skin-thumb {
  aspect-ratio: 1055 / 1491;
  background-position: center top;
}

.background-thumb.preview-pearl {
  background:
    radial-gradient(circle at 82% 8%, rgba(239, 211, 255, .72), transparent 38%),
    linear-gradient(180deg, rgba(222, 249, 251, .98) 0%, rgba(250, 247, 255, .98) 52%, rgba(236, 250, 253, .98) 100%);
}

.background-thumb.preview-deep {
  background:
    radial-gradient(circle at 88% 12%, rgba(101, 206, 232, .42), transparent 36%),
    linear-gradient(180deg, #082540 0%, #0a395b 48%, #071c34 100%);
}

.background-thumb.preview-twilight {
  background:
    radial-gradient(circle at 84% 10%, rgba(249, 192, 122, .48), transparent 36%),
    linear-gradient(180deg, #ffe1cf 0%, #efd9ff 45%, #d9f5fb 100%);
}

.background-thumb.preview-human {
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
}

.background-card strong,
.background-card small {
  min-width: 0;
}

.background-card small {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}

.app-design-picker .background-card {
  grid-template-rows: auto auto minmax(2.3em, auto);
}

.app-design-picker .background-card strong {
  font-size: .94rem;
  line-height: 1.2;
}

.background-thumb.preview-default {
  position: relative;
}

.background-thumb.preview-default::after {
  content: "Default";
  position: absolute;
  left: 8px;
  bottom: 8px;
  border-radius: 999px;
  padding: 3px 8px;
  color: #263653;
  font-size: .68rem;
  font-weight: 900;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 4px 10px rgba(45, 78, 105, .14);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  z-index: 30;
  max-width: min(92vw, 420px);
  transform: translate(-50%, 16px);
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  background: rgba(38, 54, 83, .92);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  box-shadow: 0 12px 24px rgba(38, 54, 83, .25);
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.setup-body {
  display: grid;
  place-items: start center;
  padding: 28px;
}

.setup-card {
  width: min(100%, 680px);
  padding: 28px;
  background: rgba(255, 255, 255, .92);
}

.setup-brand {
  margin-bottom: 16px;
  font-size: 2.4rem;
}

.setup-card h1 {
  margin: 0 0 18px;
  text-align: center;
}

.notice.error {
  border-color: rgba(212, 93, 123, .35);
  background: rgba(255, 238, 244, .94);
}

.notice.success {
  border-color: rgba(56, 196, 207, .35);
  background: rgba(235, 253, 255, .95);
}

.setup-form {
  display: grid;
  gap: 12px;
}

.setup-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(231, 250, 253, .9);
}

.secondary-link {
  color: #65758f;
  background: rgba(255, 255, 255, .82);
}

.manual-config {
  margin-top: 20px;
}

.manual-config h2 {
  font-size: 1rem;
}

.manual-config textarea {
  min-height: 240px;
  font-family: Consolas, Monaco, monospace;
  font-size: .86rem;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, .55);
}

@page {
  size: A4 landscape;
  margin: 0;
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .app-shell {
    padding: 16px 20px 108px;
  }

  .app-header {
    grid-template-columns: auto minmax(0, 1fr) 48px;
  }

  .brand-mark {
    font-size: 0;
  }

  .brand-mark img {
    max-height: 72px;
  }

  .premium-button {
    width: 48px;
    height: 48px;
    justify-content: center;
    padding: 0;
  }

  .premium-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .profile-hero,
  .profile-edit-head,
  .next-card {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    text-align: center;
    justify-items: center;
  }

  .next-card {
    grid-template-columns: 62px minmax(0, 1fr) 40px;
  }

  .next-card .card-icon {
    width: 62px;
  }

  .profile-edit-head {
    justify-items: center;
  }

  .profile-copy {
    width: 100%;
  }

  .activity-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
  }

  .schedule-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .schedule-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .activity-card img,
  .activity-icon {
    width: 82px;
    aspect-ratio: 1;
  }

  .activity-calendar {
    gap: 5px;
  }

  .activity-calendar > span,
  .activity-calendar > button {
    min-height: 68px;
    padding: 6px 3px;
  }

  .activity-day-labels i {
    padding: 2px 4px;
    font-size: .54rem;
  }

  .item-grid,
  .history-layout,
  .info-grid,
  .summary-panel,
  .gallery-summary {
    grid-template-columns: 1fr;
  }

  .item-card {
    grid-template-columns: 126px minmax(0, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bulk-bar {
    grid-template-columns: 1fr repeat(3, auto);
  }

  .bulk-bar button:nth-of-type(n + 3) {
    display: inline-flex;
  }

  .dual-actions,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .item-image-picker,
  .activity-image-picker {
    grid-template-columns: 1fr;
  }

  .item-image-picker img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.25;
  }

  .activity-image-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 1.55;
  }

  .bottom-nav {
    width: min(calc(100% - 16px), 704px);
    border-radius: 18px;
    padding: 6px;
  }

  .bottom-nav button {
    font-size: .72rem;
  }

  .pdf-page {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pdf-photo-collage,
  .pdf-page h3,
  .pdf-page .pdf-name,
  .pdf-page .pdf-block {
    grid-column: 1;
  }

  .pdf-photo-collage {
    grid-row: auto;
    min-height: 0;
    height: auto;
    max-height: none;
    aspect-ratio: 1.25;
  }

  .pdf-viewer-screen {
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }

  .pdf-viewer-toolbar {
    grid-template-columns: 1fr 1fr;
    border-radius: 16px;
    padding: 6px;
  }

  .pdf-viewer-toolbar .secondary-cta {
    grid-column: auto;
  }

  .pdf-viewer-toolbar .primary-cta,
  .pdf-viewer-toolbar .secondary-cta {
    min-height: 42px;
    font-size: .82rem;
  }

  .pdf-frame {
    border-radius: 12px;
  }
}

@media (max-width: 460px) {
  body {
    font-size: 14px;
  }

  .app-shell {
    padding: 14px 18px 106px;
  }

  .app-header {
    grid-template-columns: auto minmax(0, 1fr) 44px;
    gap: 8px;
    margin-bottom: 12px;
  }

  .round-button,
  .premium-button {
    width: 44px;
    height: 44px;
  }

  .header-help-group {
    grid-template-columns: 44px 38px;
    gap: 6px;
  }

  .header-help-group .tutorial-help-button {
    width: 38px;
    height: 38px;
  }

  .brand-mark {
    font-size: 0;
  }

  .brand-mark img {
    max-height: 64px;
  }

  .screen h1 {
    margin: 8px 0 22px;
    font-size: 1.42rem;
  }

  .profile-hero {
    gap: 14px;
    margin-bottom: 18px;
  }

  .profile-hero img,
  .profile-edit-head img,
  .avatar-wrap img {
    width: 124px;
  }

  .profile-hero p,
  .profile-copy label {
    font-size: .95rem;
  }

  .profile-hero h2,
  .profile-edit-head h2 {
    font-size: 2.55rem;
  }

  .badge,
  .chip,
  .activity-tag,
  .item-tag {
    padding: 6px 11px;
    font-size: .92rem;
  }

  .setup-banner {
    padding: 14px 16px;
    font-size: 1rem;
    line-height: 1.65;
  }

  .next-card {
    padding: 16px;
  }

  .next-card h3 {
    font-size: 1.18rem;
  }

  .next-card span,
  .activity-card p,
  .item-card p,
  .panel p,
  .panel-body {
    font-size: .95rem;
  }

  .primary-cta,
  .secondary-cta {
    min-height: 52px;
    font-size: 1rem;
  }

  .field-row {
    gap: 10px;
  }

  #activity-form .date-range-row,
  #activity-form .time-range-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: hidden;
  }

  #activity-form,
  #item-form {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .form-grid input,
  .form-grid select {
    padding: 10px 9px;
  }

  #activity-form .date-range-row input,
  #activity-form .time-range-row input,
  #activity-form .time-range-row select {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 0 7px;
    font-size: .92rem;
    line-height: 48px;
  }

  #activity-form .time-range-row .compact-time-field select {
    padding-right: 26px;
  }

  #activity-form .date-range-row label,
  #activity-form .time-range-row label {
    gap: 5px;
    font-size: .86rem;
    line-height: 1.18;
    overflow: hidden;
  }

  .time-picker {
    gap: 6px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    min-height: 118px;
    padding: 13px;
  }

  .stat-card .stat-icon {
    width: 48px;
    height: 48px;
  }

  .stat-card span,
  .stat-card small {
    font-size: .86rem;
  }

  .stat-card strong {
    font-size: 2.35rem;
  }

  .tabs button {
    min-height: 40px;
    padding: 8px 15px;
    font-size: .92rem;
  }

  .activity-card h3,
  .item-card h3 {
    font-size: 1.08rem;
  }

  .activity-card h3 {
    font-size: .98rem;
  }

  .activity-card p {
    font-size: .84rem;
  }

  .item-card {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .item-card img {
    width: 106px;
  }

  .gallery-grid {
    gap: 9px;
  }

  .schedule-row {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .schedule-row em {
    grid-column: 2;
    justify-self: start;
  }

  .bottom-nav {
    min-height: 72px;
    padding: 6px;
  }

  .bottom-nav button {
    min-height: 58px;
    font-size: .68rem;
    line-height: 1.15;
  }

  .bottom-nav svg {
    width: 23px;
    height: 23px;
  }
}

@media (max-width: 520px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  body {
    font-size: 13px;
    background:
      linear-gradient(180deg, rgba(232, 250, 252, .98) 0%, rgba(250, 247, 255, .98) 54%, rgba(236, 250, 253, .98) 100%),
      #f4fbff;
  }

  body::before {
    background-size: 100% 320px;
    opacity: .98;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    padding: max(10px, env(safe-area-inset-top)) 14px calc(80px + env(safe-area-inset-bottom));
  }

  .app-header {
    flex: 0 0 auto;
    grid-template-columns: auto minmax(0, 1fr) 42px;
    gap: 8px;
    min-height: 50px;
    margin: 0 0 2px;
  }

  .login-gate {
    flex: 1 1 auto;
    place-items: start center;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 0 calc(22px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  .login-panel {
    width: 100%;
    padding: 14px;
  }

  .login-panel .card-icon {
    margin-bottom: 8px;
  }

  .login-panel h1 {
    margin-bottom: 6px;
    font-size: 1.28rem;
  }

  .login-panel p {
    margin-bottom: 10px;
    font-size: .78rem;
    line-height: 1.45;
  }

  .auth-tabs {
    margin-bottom: 10px;
  }

  .login-form {
    gap: 9px;
  }

  .support-actions {
    width: 100%;
  }

  .support-link {
    flex: 1;
    min-height: 30px;
    padding: 5px 8px;
    font-size: .72rem;
  }

  .support-card {
    padding: 10px;
  }

  .support-card p {
    font-size: .76rem;
  }

  .user-ad-table {
    min-width: 620px;
  }

  .round-button,
  .premium-button {
    width: 42px;
    height: 42px;
  }

  .notify.enabled {
    color: #159ba8;
    background: rgba(235, 253, 255, .94);
  }

  .notify.enabled::after {
    background: var(--aqua);
  }

  .brand-mark {
    font-size: 0;
    font-weight: 600;
    letter-spacing: 0;
  }

  .brand-mark img {
    max-height: 58px;
  }

  .screen {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .screen[hidden] {
    display: none;
  }

  .view.active {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    animation: none;
  }

  #home.view.active,
  #profile.view.active,
  #history.view.active,
  #items.view.active {
    display: flex;
    flex-direction: column;
  }

  #home.view.active,
  #profile.view.active,
  #activities.view.active,
  #gallery.view.active,
  #history.view.active {
    overflow-y: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .screen h1 {
    flex: 0 0 auto;
    margin: 2px 0 9px;
    font-size: 1.18rem;
    line-height: 1.2;
  }

  #home .profile-hero {
    grid-template-columns: 92px minmax(0, 1fr);
    justify-items: stretch;
    gap: 12px;
    margin-bottom: 9px;
    text-align: left;
  }

  #home .profile-hero img {
    width: 92px;
  }

  #home .profile-hero p {
    margin-bottom: 4px;
    font-size: .78rem;
    line-height: 1.25;
  }

  #home .profile-hero h2 {
    margin-bottom: 5px;
    font-size: 2.25rem;
  }

  #home .badge {
    max-width: 100%;
    padding: 4px 9px;
    font-size: .76rem;
    line-height: 1.2;
  }

  #home .next-card {
    position: relative;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-height: 104px;
    margin-bottom: 8px;
    padding: 10px 40px 10px 10px;
    overflow: visible;
    background-size: 154px auto;
  }

  #home .next-card .card-icon {
    width: 42px;
    height: 42px;
  }

  #home .next-card .card-icon svg {
    width: 24px;
    height: 24px;
  }

  #home .next-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 1px 0 4px;
    font-size: .94rem;
    line-height: 1.25;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
  }

  #home .next-card p,
  #home .next-card span {
    min-width: 0;
    font-size: .68rem;
    line-height: 1.25;
  }

  #home .next-card p {
    display: block;
    margin-bottom: 2px;
  }

  #home .next-card span {
    align-items: flex-start;
  }

  #home .next-card .schedule-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 3px 0 4px;
  }

  #home .next-card .schedule-tags i {
    padding: 2px 6px;
    font-size: .56rem;
    line-height: 1.2;
  }

  #home .next-card .next-meta,
  #home .next-card .next-location {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 4px;
    overflow-wrap: anywhere;
  }

  #home .next-card .next-location {
    overflow: hidden;
  }

  #home .next-card .map-link {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #home .next-card .round-button {
    position: absolute;
    top: 10px;
    right: 8px;
    transform: none;
    width: 32px;
    height: 32px;
  }

  #home .stats-grid {
    gap: 8px;
    margin: 7px 0;
  }

  #home .stat-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    min-height: 82px;
    padding: 8px;
    column-gap: 8px;
  }

  #home .stat-card .stat-icon {
    grid-row: 1 / span 4;
    width: 42px;
    height: 42px;
    margin: 0;
  }

  #home .stat-card span,
  #home .stat-card small {
    min-width: 0;
    overflow: hidden;
    font-size: .68rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #home .stat-card strong {
    margin: 0;
    font-size: 1.95rem;
  }

  #home .home-schedule-select {
    min-height: 28px;
    padding: 3px 7px;
    font-size: .62rem;
  }

  #home .bar {
    height: 5px;
    margin-top: 3px;
  }

  #home > .primary-cta {
    flex: 0 0 auto;
    min-height: 46px;
    margin: 4px 0 6px;
    padding: 10px 14px;
    font-size: .95rem;
  }

  #home .calendar-panel {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    margin-top: 4px;
    padding: 10px;
  }

  #home .calendar-panel .section-head {
    gap: 6px;
    margin-bottom: 4px;
  }

  #home .calendar-nav {
    grid-template-columns: 28px minmax(0, auto) 28px;
    gap: 4px;
  }

  #home .calendar-nav .icon-action {
    width: 28px;
    min-height: 28px;
    font-size: 1.1rem;
  }

  #home .calendar-nav h2 {
    min-width: 7em;
    font-size: .94rem;
  }

  #home .section-head .text-button {
    min-height: 28px;
    padding: 4px 8px;
    font-size: .68rem;
  }

  #home .mini-calendar {
    gap: 3px;
    margin: 5px 0 6px;
  }

  #home .mini-calendar span,
  #home .mini-calendar button {
    gap: 1px;
    min-height: 29px;
    border-radius: 8px;
    font-size: .7rem;
  }

  #home .mini-calendar .weekday {
    min-height: 16px;
    font-size: .62rem;
  }

  #home .mini-calendar button small {
    width: 12px;
    height: 12px;
    font-size: .5rem;
  }

  #home .mini-calendar button em {
    font-size: .44rem;
  }

  #home .schedule-row {
    padding: 8px;
    overflow: visible;
  }

  #home .schedule-list {
    gap: 6px;
  }

  #home .schedule-item {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
  }

  #home .schedule-item > b {
    width: 40px;
    height: 40px;
    font-size: .82rem;
  }

  #home .schedule-item > div {
    min-width: 0;
  }

  #home .schedule-item strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: .84rem;
    line-height: 1.22;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
  }

  #home .schedule-item small,
  #home .schedule-tags {
    min-width: 0;
    font-size: .66rem;
    line-height: 1.15;
  }

  #home .schedule-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #home .schedule-item .map-link {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #home .schedule-actions,
  #home .calendar-sync {
    display: none;
  }

  #profile .profile-edit-head {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    padding: 12px;
  }

  #profile .profile-edit-head img,
  #profile .avatar-wrap img {
    width: 108px;
  }

  #profile .avatar-wrap .round-button {
    width: 34px;
    height: 34px;
  }

  #profile .profile-copy label {
    margin-bottom: 2px;
    font-size: .66rem;
  }

  #profile .profile-copy h2 {
    margin-bottom: 5px;
    font-size: 2rem;
  }

  #profile .profile-copy p {
    display: block;
    overflow: visible;
    margin-bottom: 5px;
    font-size: .75rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  #profile .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    min-height: 0;
    overflow: visible;
  }

  #profile .info-grid .panel {
    min-height: 0;
    padding: 9px;
  }

  #profile .panel-title {
    gap: 6px;
  }

  #profile .panel-title h3 {
    overflow: hidden;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #profile .panel-title .icon-action {
    width: 26px;
    min-height: 26px;
  }

  #profile .panel-body {
    display: block;
    overflow: visible;
    font-size: .66rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  #profile .wide .panel-body {
    display: block;
  }

  #profile .chip {
    padding: 3px 7px;
    font-size: .62rem;
  }

  #profile .dual-actions {
    flex: 0 0 auto;
    grid-template-columns: .82fr 1.18fr;
    gap: 8px;
    margin-top: 8px;
  }

  #profile .dual-actions .primary-cta,
  #profile .dual-actions .secondary-cta {
    min-height: 42px;
    padding: 8px 10px;
    font-size: .8rem;
  }

  #history .history-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
    overflow: visible;
  }

  #history.view.active {
    display: block;
    overflow-y: auto;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  #history .history-layout .panel {
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    overflow: visible;
    padding: 9px;
  }

  #history .pdf-page {
    display: block;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    max-height: none;
    padding: 10px;
    gap: 8px;
    overflow: visible;
    font-size: .64rem;
  }

  #history .pdf-photo-collage {
    display: grid;
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    min-height: 0;
    max-height: none;
    margin-bottom: 8px;
    aspect-ratio: 16 / 10;
    height: auto;
  }

  #history .pdf-page h3,
  #history .pdf-page .pdf-name,
  #history .pdf-page .pdf-block {
    grid-column: 1;
    margin-right: 0;
  }

  #history .pdf-page h3 {
    margin-top: 0;
    font-size: .7rem;
  }

  #history .pdf-page .pdf-name {
    margin: 0 0 2px;
  }

  #history .pdf-page .pdf-mermaid-name {
    font-size: 1.24rem;
    overflow-wrap: anywhere;
  }

  #history .pdf-page .pdf-real-name {
    font-size: .62rem;
  }

  #history .pdf-page .pdf-block {
    max-height: none;
    overflow: visible;
    font-size: .62rem;
    line-height: 1.35;
  }

  #history .pdf-page .pdf-block p,
  #history .pdf-page .pdf-block li {
    overflow: visible;
    font-size: .62rem;
    line-height: 1.35;
    -webkit-line-clamp: initial;
    -webkit-box-orient: initial;
  }

  #history .pdf-page .pdf-block p {
    display: block;
  }

  #history .pdf-page .pdf-block li {
    display: list-item;
  }

  #history .pdf-page .pdf-block ul {
    margin: 3px 0 7px 1em;
  }

  #history .pdf-contact-row b {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #history .pdf-page .qr {
    width: 74px;
    height: 88px;
    margin: 6px 0 0;
    padding: 6px;
  }

  #history .pdf-page .qr img {
    width: 60px;
    height: 60px;
  }

  #history .timeline {
    gap: 5px;
  }

  #history .timeline-row {
    gap: 6px;
  }

  #history .timeline-row p,
  #history .panel p,
  #history .panel li {
    overflow: visible;
    font-size: .62rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  #history .timeline-row p,
  #history .panel p {
    display: block;
  }

  #history .panel li {
    display: list-item;
  }

  #history .sticky-actions {
    flex: 0 0 auto;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
  }

  #history .sticky-actions .primary-cta {
    min-height: 42px;
    padding: 8px 10px;
    font-size: .8rem;
  }

  #history .created-date {
    margin: 5px 0 0;
    font-size: .66rem;
  }

  #activities .tabs,
  #items .tabs,
  #gallery .tabs {
    flex: 0 0 auto;
    gap: 8px;
    margin-bottom: 9px;
    padding-bottom: 3px;
  }

  #activities .tabs button,
  #items .tabs button,
  #gallery .tabs button {
    min-height: 34px;
    padding: 6px 12px;
    font-size: .78rem;
  }

  #activities > .primary-cta,
  #items > .primary-cta,
  #gallery > .primary-cta {
    flex: 0 0 auto;
    min-height: 44px;
    margin-bottom: 9px;
    padding: 9px 14px;
    font-size: .92rem;
  }

  #activities .activity-calendar-panel {
    margin-top: 0;
    padding: 10px;
  }

  #activities .activity-calendar {
    gap: 4px;
    margin-top: 8px;
  }

  #activities .activity-calendar > span,
  #activities .activity-calendar > button {
    min-height: 50px;
    padding: 5px 2px;
  }

  #activities .activity-list {
    gap: 10px;
    margin-top: 10px;
  }

  #activities .calendar-sync {
    margin: 10px 0 8px;
    padding: 10px;
  }

  #activities .calendar-sync-head {
    align-items: flex-start;
    gap: 8px;
  }

  #activities .calendar-sync h3 {
    font-size: .82rem;
  }

  #activities .calendar-sync p {
    font-size: .66rem;
    line-height: 1.4;
  }

  #activities .calendar-sync-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  #activities .calendar-sync-actions .secondary-small {
    min-width: 0;
    min-height: 38px;
    padding: 7px 8px;
    font-size: .68rem;
  }

  #activities .activity-card {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 10px;
  }

  #activities .activity-card.no-media {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  #activities .activity-card img,
  #activities .activity-icon {
    width: 82px;
  }

  #activities .activity-card h3 {
    margin: 4px 0;
    font-size: .94rem;
  }

  #activities .activity-card p {
    margin: 3px 0;
    font-size: .72rem;
    line-height: 1.3;
  }

  #activities .switch-row {
    margin-top: 5px;
  }

  #items .item-grid {
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
    margin-top: 0;
    overflow-y: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  #items .item-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  #items .item-card img {
    width: 76px;
  }

  #items .item-card .more {
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
  }

  #items .item-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 2px 24px 3px 0;
    font-size: .78rem;
    line-height: 1.2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  #items .item-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 2px 0;
    font-size: .62rem;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  #items .item-tag {
    padding: 3px 7px;
    font-size: .58rem;
  }

  #items .summary-panel {
    flex: 0 0 auto;
    grid-template-columns: .85fr 1.15fr;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
  }

  #items .summary-panel h2 {
    margin: 0 0 3px;
    font-size: .78rem;
  }

  #items .summary-panel strong {
    font-size: 1.85rem;
  }

  #items .summary-panel p,
  #items .summary-panel li {
    font-size: .62rem;
    line-height: 1.35;
  }

  #gallery .gallery-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 9px;
    padding: 10px;
  }

  #gallery .gallery-summary .big-count {
    gap: 6px;
  }

  #gallery .gallery-summary .big-count span {
    width: 38px;
    height: 38px;
  }

  #gallery .gallery-summary strong {
    font-size: 1.5rem;
  }

  #gallery .gallery-summary .text-button {
    grid-column: 1 / -1;
    min-height: 32px;
  }

  #gallery .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
    padding-bottom: 96px;
  }

  #gallery .bulk-bar {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(76px + env(safe-area-inset-bottom));
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(48px, auto));
    width: auto;
    margin: 0 auto;
    padding: 8px;
    border-radius: 18px;
  }

  #gallery .bulk-bar button {
    min-width: 50px;
    min-height: 46px;
    font-size: .62rem;
  }

  .bottom-nav {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(calc(100% - 20px), 704px);
    min-height: 68px;
    border-radius: 20px;
    padding: 5px;
  }

  .bottom-nav button {
    min-height: 56px;
    border-radius: 16px;
    font-size: .62rem;
    line-height: 1.12;
  }

  .bottom-nav svg {
    width: 22px;
    height: 22px;
  }

  .bottom-ad {
    bottom: calc(74px + env(safe-area-inset-bottom));
    width: min(calc(100% - 20px), 704px);
    height: 52px;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: stretch;
  }

  .modal-card {
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 12px;
  }

  .background-card-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .background-thumb {
    aspect-ratio: 16 / 10;
  }

  #activity-form {
    gap: 8px;
  }

  #activity-form .field-row {
    gap: 8px;
  }

  #activity-form .date-range-row,
  #activity-form .time-range-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: hidden;
  }

  #activity-form input,
  #activity-form select {
    height: 48px;
    min-height: 48px;
  }

  #activity-form .date-range-row input,
  #activity-form .time-range-row input,
  #activity-form .time-range-row select {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 0 6px;
    font-size: .88rem;
    line-height: 48px;
  }

  #activity-form .time-range-row .compact-time-field select {
    padding-right: 24px;
  }

  #activity-form .date-range-row label,
  #activity-form .time-range-row label {
    gap: 5px;
    font-size: .82rem;
    line-height: 1.16;
    overflow: hidden;
  }

  #activity-form .activity-image-picker {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  #activity-form .activity-image-picker.no-image {
    grid-template-columns: minmax(0, 1fr);
  }

  #activity-form .activity-image-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 1.55;
  }

  .notification-status {
    grid-template-columns: 1fr;
  }

  .notification-status .primary-cta {
    width: 100%;
  }

  .notification-history-list {
    max-height: 52vh;
  }
}

@media print {
  html,
  body {
    width: 297mm;
    height: 210mm;
    margin: 0;
    overflow: hidden;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body[data-app-background] {
    background: #fff;
  }

  body::before,
  .app-header,
  .setup-banner,
  .bottom-nav,
  .pdf-viewer-screen,
  .screen > .view:not(#history),
  .history-layout > :not(.pdf-preview-panel),
  .sticky-actions,
  .created-date,
  .toast {
    display: none !important;
  }

  .app-shell {
    width: 297mm;
    height: 210mm;
    padding: 0;
    overflow: hidden;
  }

  .view,
  #history {
    display: block !important;
    width: 297mm;
    height: 210mm;
    overflow: hidden;
  }

  #history h1 {
    display: none;
  }

  .history-layout {
    display: block;
    width: 297mm;
    height: 210mm;
    overflow: hidden;
  }

  .pdf-preview-panel {
    width: 297mm;
    height: 210mm;
    border: 0;
    box-shadow: none;
    padding: 0;
    overflow: hidden;
  }

  .preview-label,
  .page-count {
    display: none;
  }

  .pdf-page {
    grid-template-columns: minmax(0, 112mm) minmax(0, 1fr);
    gap: 6mm;
    width: 297mm;
    height: 210mm;
    min-height: 0;
    max-height: none;
    padding: 12mm;
    overflow: hidden;
    box-shadow: none;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pdf-photo-collage {
    gap: 1.4mm;
    min-height: 0;
    max-height: 186mm;
    background: transparent;
  }

  .pdf-photo-collage img {
    opacity: 1;
  }

  .pdf-page h3 {
    margin-right: 30mm;
    color: #203657;
    font-size: 10pt;
  }

  .pdf-page .pdf-name {
    margin: 0 30mm 4mm 0;
  }

  .pdf-page .pdf-mermaid-name {
    font-size: 28pt;
  }

  .pdf-page .pdf-block {
    max-height: 145mm;
    overflow: hidden;
    color: #203657;
    font-size: 10pt;
    line-height: 1.55;
  }

  .pdf-page[data-template="deep_sea"] h3,
  .pdf-page[data-template="deep_sea"] .pdf-name,
  .pdf-page[data-template="deep_sea"] .pdf-block,
  .pdf-page[data-template="deep_ocean"] h3,
  .pdf-page[data-template="deep_ocean"] .pdf-name,
  .pdf-page[data-template="deep_ocean"] .pdf-block {
    color: #f3fdff;
  }

  .pdf-page[data-template="deep_sea"] .pdf-real-name,
  .pdf-page[data-template="deep_ocean"] .pdf-real-name {
    color: #b6e3ea;
  }

  .pdf-page[data-template="deep_sea"] .pdf-block h4,
  .pdf-page[data-template="deep_sea"] .pdf-block p,
  .pdf-page[data-template="deep_sea"] .pdf-block li,
  .pdf-page[data-template="deep_sea"] .pdf-contact-row b,
  .pdf-page[data-template="deep_ocean"] .pdf-block h4,
  .pdf-page[data-template="deep_ocean"] .pdf-block p,
  .pdf-page[data-template="deep_ocean"] .pdf-block li,
  .pdf-page[data-template="deep_ocean"] .pdf-contact-row b {
    color: #f3fdff;
  }

  .pdf-page[data-template="deep_sea"] .pdf-block h4,
  .pdf-page[data-template="deep_ocean"] .pdf-block h4 {
    color: #bff6ff;
  }

.pdf-page[data-template="siren_luxury"] h3,
.pdf-page[data-template="siren_luxury"] .pdf-name,
.pdf-page[data-template="siren_luxury"] .pdf-block,
.pdf-page[data-template="twilight_luxury"] h3,
.pdf-page[data-template="twilight_luxury"] .pdf-name,
.pdf-page[data-template="twilight_luxury"] .pdf-block {
  color: #4f353a;
}

.pdf-page[data-template="siren_luxury"] .pdf-real-name,
.pdf-page[data-template="twilight_luxury"] .pdf-real-name {
  color: #704e54;
}

  .pdf-page[data-template="siren_luxury"] .pdf-block h4,
.pdf-page[data-template="siren_luxury"] .pdf-block p,
.pdf-page[data-template="siren_luxury"] .pdf-block li,
.pdf-page[data-template="siren_luxury"] .pdf-contact-row b,
.pdf-page[data-template="twilight_luxury"] .pdf-block h4,
.pdf-page[data-template="twilight_luxury"] .pdf-block p,
.pdf-page[data-template="twilight_luxury"] .pdf-block li,
.pdf-page[data-template="twilight_luxury"] .pdf-contact-row b {
  color: #4f353a;
}

  .pdf-page[data-template="siren_luxury"] .pdf-block h4,
  .pdf-page[data-template="twilight_luxury"] .pdf-block h4 {
    color: #8c5746;
  }

  .pdf-page[data-template="human"] h3,
  .pdf-page[data-template="human"] .pdf-name,
  .pdf-page[data-template="human"] .pdf-block,
  .pdf-page[data-template="human"] .pdf-block h4,
  .pdf-page[data-template="human"] .pdf-block p,
  .pdf-page[data-template="human"] .pdf-block li,
  .pdf-page[data-template="human"] .pdf-contact-row b {
    color: #172235;
  }

  .pdf-page .qr {
    width: 25mm;
    height: 29mm;
    padding: 2mm;
  }

  .pdf-page .qr img {
    width: 20mm;
    height: 20mm;
  }
}

@media print {
  .pdf-page[data-orientation] {
    display: block;
    padding: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }

  .pdf-page[data-orientation="portrait"] {
    width: 210mm;
    height: 297mm;
  }

  .pdf-page[data-orientation="landscape"] {
    width: 297mm;
    height: 210mm;
  }

  .pdf-page[data-orientation] .pdf-photo-collage,
  .pdf-page[data-orientation] .pdf-name,
  .pdf-page[data-orientation] .pdf-block,
  .pdf-page[data-orientation] .pdf-contact,
  .pdf-page[data-orientation] .qr {
    position: absolute;
  }
}

#history .pdf-page[data-orientation] {
  position: relative;
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: hidden !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
}

#history .pdf-page[data-orientation] h3,
#history .pdf-page[data-orientation] .pdf-block h4 {
  display: none !important;
}

#history .pdf-page[data-orientation] .pdf-photo-collage,
#history .pdf-page[data-orientation] .pdf-name,
#history .pdf-page[data-orientation] .pdf-block,
#history .pdf-page[data-orientation] .pdf-contact,
#history .pdf-page[data-orientation] .qr {
  position: absolute !important;
  grid-column: auto !important;
  grid-row: auto !important;
  margin: 0 !important;
  max-height: none !important;
}

#history .pdf-page[data-orientation] .pdf-photo-collage {
  display: grid !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}

#history .pdf-page[data-orientation] .pdf-photo-collage img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

#history .pdf-page[data-orientation] .pdf-block {
  overflow: hidden !important;
  padding: 0 !important;
}

#history .pdf-page[data-orientation] .pdf-block p,
#history .pdf-page[data-orientation] .pdf-block li {
  overflow: hidden !important;
}

#history .pdf-page[data-orientation] .qr {
  display: grid !important;
  padding: 3% !important;
  background: transparent !important;
  box-shadow: none !important;
}

#history .pdf-page[data-orientation] .qr img {
  width: 100% !important;
  height: 100% !important;
}

#history .pdf-page[data-orientation="portrait"] .pdf-photo-collage {
  left: 48% !important;
  top: 7.5% !important;
  width: 44% !important;
  height: 49.5% !important;
}

#history .pdf-page[data-orientation="portrait"] .pdf-name {
  left: 13% !important;
  top: 12% !important;
  width: 31% !important;
}

#history .pdf-page[data-orientation="portrait"] .pdf-about {
  left: 7.5% !important;
  top: 37% !important;
  width: 35% !important;
  height: 20.5% !important;
}

#history .pdf-page[data-orientation="portrait"] .pdf-skills {
  left: 8% !important;
  top: 66% !important;
  width: 36% !important;
  height: 10.5% !important;
}

#history .pdf-page[data-orientation="portrait"] .pdf-licenses {
  left: 50% !important;
  top: 66% !important;
  width: 30% !important;
  height: 10.5% !important;
}

#history .pdf-page[data-orientation="portrait"] .pdf-contact {
  left: 8% !important;
  top: 84% !important;
  width: 40% !important;
  height: 10.5% !important;
}

#history .pdf-page[data-orientation="portrait"] .qr {
  left: 53% !important;
  top: 82% !important;
  width: 15% !important;
  height: 11.5% !important;
}

#history .pdf-page[data-orientation="landscape"] .pdf-photo-collage {
  left: 63.5% !important;
  top: 10% !important;
  width: 30.5% !important;
  height: 75% !important;
}

#history .pdf-page[data-orientation="landscape"] .pdf-name {
  left: 21% !important;
  top: 14% !important;
  width: 34% !important;
}

#history .pdf-page[data-orientation="landscape"] .pdf-about {
  left: 4.5% !important;
  top: 45% !important;
  width: 29% !important;
  height: 22% !important;
}

#history .pdf-page[data-orientation="landscape"] .pdf-skills {
  left: 37% !important;
  top: 45% !important;
  width: 23.5% !important;
  height: 22% !important;
}

#history .pdf-page[data-orientation="landscape"] .pdf-licenses {
  left: 8% !important;
  top: 79% !important;
  width: 20% !important;
  height: 11% !important;
}

#history .pdf-page[data-orientation="landscape"] .pdf-contact {
  left: 33% !important;
  top: 79% !important;
  width: 19.5% !important;
  height: 11% !important;
}

#history .pdf-page[data-orientation="landscape"] .qr {
  left: 52% !important;
  top: 77% !important;
  width: 10% !important;
  height: 13% !important;
}

/* v0.61 readability and PDF preview corrections */
.next-card {
  background: rgba(255, 255, 255, .42);
  border-color: rgba(255, 255, 255, .35);
  backdrop-filter: blur(12px);
}

body[data-skin="deep_ocean"] .next-card {
  color: rgba(255, 255, 255, .94);
  background: rgba(5, 25, 45, .56);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 14px 30px rgba(1, 14, 26, .28);
}

body[data-skin="deep_ocean"] .next-card p,
body[data-skin="deep_ocean"] .next-card h3,
body[data-skin="deep_ocean"] .next-card span,
body[data-skin="deep_ocean"] .next-card .map-link {
  color: inherit;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .24);
}

body[data-skin="deep_ocean"] .next-card p {
  color: #6fe8f2;
}

body[data-skin="deep_ocean"] .next-card .schedule-tags i {
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .2);
}

body[data-skin="deep_ocean"] .panel,
body[data-skin="deep_ocean"] .stat-card,
body[data-skin="deep_ocean"] .activity-card,
body[data-skin="deep_ocean"] .item-card,
body[data-skin="deep_ocean"] .gallery-summary,
body[data-skin="deep_ocean"] .bulk-bar,
body[data-skin="deep_ocean"] .profile-edit-head {
  color: rgba(255, 255, 255, .94);
  background: rgba(5, 25, 45, .62);
  border-color: rgba(255, 255, 255, .18);
}

body[data-skin="deep_ocean"] .panel p,
body[data-skin="deep_ocean"] .panel li,
body[data-skin="deep_ocean"] .panel small,
body[data-skin="deep_ocean"] .panel label,
body[data-skin="deep_ocean"] .activity-card p,
body[data-skin="deep_ocean"] .item-card p,
body[data-skin="deep_ocean"] .gallery-summary small,
body[data-skin="deep_ocean"] .stat-card span,
body[data-skin="deep_ocean"] .stat-card small,
body[data-skin="deep_ocean"] .created-date,
body[data-skin="deep_ocean"] .page-settings-panel button {
  color: rgba(255, 255, 255, .76);
}

body[data-skin="deep_ocean"] .stat-card strong,
body[data-skin="deep_ocean"] .panel h2,
body[data-skin="deep_ocean"] .panel h3,
body[data-skin="deep_ocean"] .activity-card h3,
body[data-skin="deep_ocean"] .item-card h3,
body[data-skin="deep_ocean"] .profile-copy h2 {
  color: rgba(255, 255, 255, .94);
}

body[data-skin="deep_ocean"] .modal-card,
body[data-skin="deep_ocean"] .notification-status,
body[data-skin="deep_ocean"] .notification-history-panel,
body[data-skin="deep_ocean"] .notification-history-item,
body[data-skin="deep_ocean"] .tutorial-step,
body[data-skin="deep_ocean"] .calendar-sync,
body[data-skin="deep_ocean"] .design-setting-block,
body[data-skin="deep_ocean"] .background-card {
  color: #263653;
  background: rgba(255, 255, 255, .92);
  border-color: rgba(118, 159, 184, .28);
  text-shadow: none;
}

body[data-skin="deep_ocean"] .modal-card h2,
body[data-skin="deep_ocean"] .modal-card h3,
body[data-skin="deep_ocean"] .modal-card label,
body[data-skin="deep_ocean"] .notification-status h3,
body[data-skin="deep_ocean"] .notification-history-item strong,
body[data-skin="deep_ocean"] .tutorial-step strong,
body[data-skin="deep_ocean"] .background-card strong {
  color: #263653;
  text-shadow: none;
}

body[data-skin="deep_ocean"] .modal-card p,
body[data-skin="deep_ocean"] .modal-card small,
body[data-skin="deep_ocean"] .modal-card .form-note,
body[data-skin="deep_ocean"] .notification-status p,
body[data-skin="deep_ocean"] .notification-history-item p,
body[data-skin="deep_ocean"] .notification-history-item small,
body[data-skin="deep_ocean"] .tutorial-lead,
body[data-skin="deep_ocean"] .tutorial-step p,
body[data-skin="deep_ocean"] .background-card small {
  color: #60728b;
}

body[data-skin="deep_ocean"] input,
body[data-skin="deep_ocean"] textarea,
body[data-skin="deep_ocean"] select {
  color: #263653;
  background: rgba(255, 255, 255, .96);
  border-color: rgba(118, 159, 184, .34);
}

body[data-skin="deep_ocean"] input::placeholder,
body[data-skin="deep_ocean"] textarea::placeholder {
  color: rgba(38, 54, 83, .46);
}

.template-card {
  min-height: 86px;
  font-size: 0;
}

.template-card small {
  display: none;
}

@media screen {
  #history .pdf-preview-panel {
    display: grid;
    justify-items: center;
    overflow: hidden;
  }

  #history .pdf-page[data-orientation] {
    width: var(--pdf-preview-fit-width, min(100%, 420px)) !important;
    max-width: 100% !important;
    aspect-ratio: var(--pdf-preview-aspect, 210 / 297) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #history .pdf-page[data-orientation] .pdf-mermaid-name {
    font-size: clamp(13px, 5.1vw, 30px) !important;
  }

  #history .pdf-page[data-orientation] .pdf-real-name {
    font-size: clamp(6px, 2.1vw, 11px) !important;
  }

  #history .pdf-page[data-orientation] .pdf-block {
    font-size: clamp(4.8px, 1.65vw, 9px) !important;
    line-height: 1.34 !important;
  }

  #history .pdf-page[data-orientation] .pdf-contact-row {
    gap: 2px !important;
    line-height: 1.08 !important;
  }

  #history .pdf-page[data-orientation] .pdf-contact-row > span {
    width: clamp(9px, 3vw, 17px) !important;
    height: clamp(9px, 3vw, 17px) !important;
  }

  #history .pdf-page[data-orientation] .pdf-contact-row b {
    font-size: clamp(4.8px, 1.55vw, 8px) !important;
  }
}

