:root {
  --paper: #f3ecd9;
  --paper-deep: #e4d6b8;
  --ink: #2f2b24;
  --muted: #756c5e;
  --line: rgba(93, 79, 56, 0.18);
  --olive: #384f24;
  --olive-soft: #dfe7cf;
  --rust: #a34f22;
  --bluegray: #3f5660;
  --shadow: rgba(47, 43, 36, 0.18);
  --header-bg: #efe5cc;
  --header-border: #c9b98f;
  --card-border: #c9b98f;
  --control-bg: #e6dbc4;
  --control-hover: #f1e7d0;
  --field-bg: rgba(255,250,238,0.72);
  --card-fill: rgba(255,250,238,0.54);
  --card-radius: 6px;
  --control-radius: 4px;
  --font-main: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", sans-serif;
  --font-hand: "Yomogi", "Zen Kurenaido", "Hannotate SC", "TsukuARdGothic-Regular", "Hiragino Maru Gothic ProN", cursive;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { width: 100%; max-width: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-main);
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.28), transparent 28%),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    #2c2922;
  background-size: auto, 22px 22px, 22px 22px, auto;
  color: var(--ink);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body.auth-booting > * {
  visibility: hidden;
}
header { background: var(--header-bg); color: var(--ink); padding: 16px 24px 12px;
         display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--header-border);
         box-shadow: 0 4px 18px rgba(0,0,0,0.18); position: sticky; top: 0; z-index: 50; width: 100%; max-width: 100%; overflow-x: clip; }
.brand-area { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-link { appearance: none; border: 0; background: transparent; color: inherit; display: inline-flex;
              align-items: center; gap: 10px; min-width: 0; cursor: pointer; font-family: inherit; }
.brand-mark { width: 36px; height: 36px; object-fit: contain; border-radius: 9px;
              box-shadow: 0 1px 4px rgba(47,43,36,0.18); background: rgba(255,255,255,0.62); }
.brand-word { font-size: 21px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.brand-link:hover .brand-word { color: var(--olive); }
header h1 { font-size: 21px; font-weight: 700; letter-spacing: 0.02em; cursor: pointer; white-space: nowrap; }
header h1:hover { color: var(--olive); }
.app-subtitle { color: var(--muted); display: grid; gap: 1px; line-height: 1.2; max-width: 420px; min-width: 0; }
.app-subtitle-main { color: var(--ink); font-size: 12px; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-subtitle-sub { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header .tag { background: transparent; color: var(--rust); font-size: 10px;
              font-weight: 800; padding: 3px 8px; border: 1px solid var(--rust);
              border-radius: 999px; transform: rotate(-2deg); display: inline-flex; align-items: center; gap: 4px; }
header .tag.launch-tag {
  transform: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: color-mix(in srgb, var(--field-bg) 82%, var(--rust) 10%);
}
.tag-glyph,
header .tag::before,
.category-badge::before,
.pack-dashboard-tag::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.7 2.1h6.1c.5 0 1 .2 1.4.6l5 5c.5.5.5 1.3 0 1.8l-4.7 4.7c-.5.5-1.3.5-1.8 0l-5-5c-.4-.4-.6-.9-.6-1.4V2.1Zm3.4 4.4a1.4 1.4 0 1 0 0-2.8 1.4 1.4 0 0 0 0 2.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.7 2.1h6.1c.5 0 1 .2 1.4.6l5 5c.5.5.5 1.3 0 1.8l-4.7 4.7c-.5.5-1.3.5-1.8 0l-5-5c-.4-.4-.6-.9-.6-1.4V2.1Zm3.4 4.4a1.4 1.4 0 1 0 0-2.8 1.4 1.4 0 0 0 0 2.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.auth-area { margin-left: 0; display: flex; align-items: center; gap: 10px; }
.auth-user { font-size: 13px; color: var(--muted); max-width: 240px; overflow: hidden;
             text-overflow: ellipsis; white-space: nowrap; }
.header-rank-chip {
  display: none; align-items: center; gap: 7px; min-width: 0;
  background: color-mix(in srgb, var(--control-bg) 78%, var(--olive) 12%);
  color: var(--ink); border: 1px solid var(--card-border); border-radius: 999px;
  padding: 4px 9px 4px 5px; font-family: inherit; cursor: pointer;
  box-shadow: 0 1px 4px rgba(47,43,36,0.10);
}
.header-rank-chip.active { display: inline-flex; }
.header-rank-chip:hover { background: var(--control-hover); border-color: var(--olive); }
.header-rank-chip img { width: 28px; height: 28px; object-fit: contain; flex: 0 0 auto; }
.header-special-badge {
  display: none;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid rgba(184,122,44,0.38);
  border-radius: 999px;
  background: color-mix(in srgb, var(--field-bg) 76%, #d9a441 24%);
  color: #6d4512;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 10px;
  white-space: nowrap;
}
.header-special-badge.active { display: inline-flex; }
.header-special-badge-icon { font-size: 13px; line-height: 1; }
.header-info-chip {
  display: none;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, #c95f24 48%, var(--card-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 72%, #f0b35f 28%);
  color: var(--ink);
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(151, 81, 27, 0.16);
}
.header-info-chip.active { display: inline-flex; }
.header-info-chip .plb-icon {
  width: 17px;
  height: 17px;
  color: #a34f22;
}
.header-info-chip:hover { background: color-mix(in srgb, var(--paper) 56%, #f0b35f 44%); }
.header-info-chip.active {
  animation: infoPulse 1800ms ease-in-out infinite;
}
@keyframes infoPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 6px 18px rgba(151, 81, 27, 0.16); }
  50% { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(151, 81, 27, 0.22); }
}
.header-rank-copy { display: grid; gap: 1px; min-width: 0; text-align: left; line-height: 1.05; }
.header-rank-name { font-size: 11px; font-weight: 900; color: var(--muted); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-rank-points { font-size: 13px; font-weight: 900; color: var(--olive); white-space: nowrap; }
.header-rank-ai { font-size: 10px; font-weight: 900; color: var(--muted); white-space: nowrap; }
.btn-profile { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
               background: var(--control-bg); color: var(--ink); border: 1px solid var(--card-border);
               border-radius: 999px; font-size: 17px; cursor: pointer; overflow: hidden; padding: 0; }
.btn-profile:hover { background: var(--control-hover); }
.btn-profile img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px; display: block; }
.btn-profile .plb-icon { width: 21px; height: 21px; }
.btn-auth { background: var(--control-bg); color: var(--ink); border: 1px solid var(--card-border);
            border-radius: 5px; padding: 8px 12px; max-width: 190px; font-size: 13px; font-weight: 700; line-height: 1.15; cursor: pointer; }
.btn-auth:hover { background: var(--control-hover); }
button,
.btn-primary,
.btn-clear,
.btn-add,
.btn-link,
.btn-amazon,
.btn-pack,
.btn-mini,
.tab-btn,
.global-search-toggle,
.global-search-submit,
.mobile-menu-toggle,
.mobile-floating-menu,
.engagement-btn,
.follow-btn,
.home-panel-link,
a.btn-mini,
a.btn-link {
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    filter 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  will-change: transform;
}
.plb-icon {
  width: 1.35em;
  height: 1.35em;
  display: inline-block;
  flex: 0 0 auto;
  color: currentColor;
  stroke: currentColor;
  overflow: visible;
  vertical-align: -0.2em;
}
.btn-mini .plb-icon,
.engagement-btn .plb-icon,
.engagement-summary-chip .plb-icon {
  width: 1.28em;
  height: 1.28em;
}
.diary-mobile-icon-action .plb-icon,
.diary-mobile-map-action .plb-icon,
.diary-mobile-save-action .plb-icon {
  width: 21px;
  height: 21px;
}
.plb-icon-danger {
  color: #8f321f;
}
.mountain-name,
.campground-name {
  display: flex;
  align-items: center;
  gap: 5px;
}
.mountain-name .plb-icon,
.campground-name .plb-icon {
  width: 1.2em;
  height: 1.2em;
  color: var(--olive);
}
.btn-mini:has(.plb-icon),
.btn-pack:has(.plb-icon),
.engagement-btn:has(.plb-icon),
.engagement-summary-chip:has(.plb-icon) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover,
  .btn-primary:not(:disabled):hover,
  .btn-clear:not(:disabled):hover,
  .btn-add:not(:disabled):hover,
  .btn-link:not(:disabled):hover,
  .btn-amazon:not(:disabled):hover,
  .btn-pack:not(:disabled):hover,
  .btn-mini:not(:disabled):hover,
  .tab-btn:not(:disabled):hover,
  .global-search-toggle:not(:disabled):hover,
  .global-search-submit:not(:disabled):hover,
  .mobile-menu-toggle:not(:disabled):hover,
  .mobile-floating-menu:not(:disabled):hover,
  .engagement-btn:not(:disabled):hover,
  .follow-btn:not(:disabled):hover,
  .home-panel-link:not(:disabled):hover,
  a.btn-mini:hover,
  a.btn-link:hover {
    transform: translateY(-1px);
    filter: brightness(1.015);
    box-shadow: 0 5px 14px rgba(38, 53, 27, 0.14);
  }
}
button:active,
.btn-primary:active,
.btn-clear:active,
.btn-add:active,
.btn-link:active,
.btn-amazon:active,
.btn-pack:active,
.btn-mini:active,
.tab-btn:active,
.global-search-toggle:active,
.global-search-submit:active,
.mobile-menu-toggle:active,
.mobile-floating-menu:active,
.engagement-btn:active,
.follow-btn:active,
.home-panel-link:active,
a.btn-mini:active,
a.btn-link:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.96);
  box-shadow: inset 0 2px 5px rgba(38, 53, 27, 0.18);
}
@media (hover: none), (pointer: coarse) {
  button:active,
  .btn-primary:active,
  .btn-clear:active,
  .btn-add:active,
  .btn-link:active,
  .btn-amazon:active,
  .btn-pack:active,
  .btn-mini:active,
  .tab-btn:active,
  .global-search-toggle:active,
  .global-search-submit:active,
  .mobile-menu-toggle:active,
  .mobile-floating-menu:active,
  .engagement-btn:active,
  .follow-btn:active,
  .home-panel-link:active,
  a.btn-mini:active,
  a.btn-link:active {
    transform: translateY(1px) scale(0.98);
  }
}
button:disabled:active,
.btn-primary:disabled:active,
.btn-clear:disabled:active,
.btn-add:disabled:active,
.btn-link:disabled:active,
.btn-amazon:disabled:active,
.btn-pack:disabled:active,
.btn-mini:disabled:active {
  transform: none;
  filter: none;
  box-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  button,
  .btn-primary,
  .btn-clear,
  .btn-add,
  .btn-link,
  .btn-amazon,
  .btn-pack,
  .btn-mini,
  .tab-btn,
  .global-search-toggle,
  .global-search-submit,
  .mobile-menu-toggle,
  .mobile-floating-menu,
  .engagement-btn,
  .follow-btn,
  .home-panel-link,
  a.btn-mini,
  a.btn-link {
    transition-duration: 1ms;
  }
}
.theme-switch { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.language-switch { margin-left: 0; }
.theme-switch label { font-size: 11px; color: var(--muted); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.theme-switch select {
  background: var(--field-bg); color: var(--ink); border: 1px solid var(--card-border);
  border-radius: var(--control-radius); padding: 8px 10px; font-size: 13px;
  font-family: inherit; font-weight: 700; outline: none;
}
.theme-switch select:focus { border-color: var(--olive); }
.theme-switch select:disabled { opacity: 0.72; cursor: not-allowed; }
.top-workbar { width: 100%; display: grid; grid-template-columns: minmax(48px, 1fr) auto minmax(48px, 1fr);
               gap: 12px; align-items: center; padding-top: 12px; border-top: 1px solid rgba(93,79,56,0.14); }
.top-workbar .tab-stack { grid-column: 2; }
.global-search { display: flex; gap: 7px; min-width: 0; position: relative; justify-self: end; }
.global-search-toggle { width: 48px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
                        background:
                          radial-gradient(circle at 34% 30%, rgba(255,255,255,0.62), transparent 42%),
                          var(--control-bg);
                        color: var(--olive); border: 1px solid color-mix(in srgb, var(--card-border) 70%, var(--olive) 30%);
                        border-radius: 999px; font-family: inherit; cursor: pointer;
                        box-shadow: 0 6px 16px rgba(47,43,36,0.14), inset 0 1px 0 rgba(255,255,255,0.55);
                        transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.search-lens-icon { position: relative; width: 23px; height: 23px; display: inline-block; }
.search-lens-icon::before { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px;
                            border: 3px solid currentColor; border-radius: 999px; background: rgba(255,250,238,0.28); }
.search-lens-icon::after { content: ""; position: absolute; left: 15px; top: 15px; width: 10px; height: 3px;
                           border-radius: 999px; background: currentColor; transform: rotate(45deg); transform-origin: left center; }
.global-search-toggle:hover,
.global-search.expanded .global-search-toggle { background:
                                                  radial-gradient(circle at 34% 30%, rgba(255,255,255,0.72), transparent 42%),
                                                  var(--control-hover);
                                                border-color: var(--olive); color: var(--olive);
                                                transform: translateY(-1px);
                                                box-shadow: 0 8px 20px rgba(47,43,36,0.18), inset 0 1px 0 rgba(255,255,255,0.62); }
.global-search-form { display: none; position: absolute; top: 0; right: 0; z-index: 85; width: min(520px, calc(100vw - 28px));
                      gap: 7px; padding: 0; background: var(--paper); border-radius: var(--control-radius);
                      box-shadow: 0 10px 28px rgba(47,43,36,0.18); }
.global-search.expanded .global-search-form { display: flex; }
.global-search input { flex: 1; min-width: 0; background: var(--field-bg); color: var(--ink);
                       border: 1px solid var(--card-border); border-radius: var(--control-radius);
                       padding: 9px 10px; font-family: inherit; font-size: 13px; outline: none; }
.global-search input:focus { border-color: var(--olive); box-shadow: 0 0 0 2px rgba(62,84,44,0.12); }
.global-search-submit { flex: 0 0 auto; background: var(--olive); color: #fbf6e8;
                        border: 1px solid var(--olive); border-radius: var(--control-radius);
                        padding: 9px 12px; font-family: inherit; font-weight: 800; cursor: pointer; }
.global-search-collapse { flex: 0 0 auto; width: 38px; background: var(--control-bg); color: var(--muted);
                          border: 1px solid var(--card-border); border-radius: var(--control-radius);
                          font-family: inherit; font-size: 18px; font-weight: 900; cursor: pointer; }
.global-search-collapse:hover { background: var(--control-hover); color: var(--ink); }
.global-search-results { display: none; position: absolute; top: calc(100% + 8px); left: auto; right: 0;
                         z-index: 80; background: var(--paper); border: 1px solid var(--card-border);
                         border-radius: var(--card-radius); box-shadow: 0 18px 44px rgba(0,0,0,0.28);
                         width: min(520px, calc(100vw - 28px)); max-height: min(68vh, 520px); overflow: auto; padding: 10px; }
.global-search-results.active { display: grid; gap: 10px; }
.global-search-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
                      padding-bottom: 8px; border-bottom: 1px solid rgba(93,79,56,0.14); }
.global-search-title { font-size: 13px; font-weight: 900; color: var(--ink); }
.global-search-close { border: none; background: transparent; color: var(--muted); font-size: 18px;
                       font-weight: 900; line-height: 1; cursor: pointer; }
.global-result-section { display: grid; gap: 6px; }
.global-result-label { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: 0.1em;
                       text-transform: uppercase; }
.global-result-item { display: grid; gap: 2px; width: 100%; text-align: left; background: rgba(255,250,238,0.58);
                      border: 1px solid rgba(158,139,96,0.24); border-radius: var(--control-radius);
                      padding: 9px 10px; color: var(--ink); font: inherit; cursor: pointer; }
.global-result-item:hover { background: var(--control-hover); }
.global-result-title { font-size: 13px; font-weight: 900; overflow-wrap: anywhere; }
.global-result-meta { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.45; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 12px 16px 24px; overflow-x: clip; }
.action-sidebar {
  display: none;
  position: sticky;
  top: 10px;
  align-self: start;
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--paper) 92%, white 8%);
  box-shadow: 0 8px 22px rgba(47,43,36,0.08);
  padding: 12px;
  min-width: 0;
}
.action-sidebar-group { display: none; gap: 8px; }
.action-sidebar-group.active { display: grid; }
.action-sidebar-group[hidden],
.tab-btn[hidden],
.action-tab[hidden],
.legacy-feature-nav[hidden] {
  display: none !important;
}
.action-sidebar-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 4px 5px;
}
.action-sidebar button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
.action-sidebar button .plb-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.action-sidebar button span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.action-sidebar button:hover { background: var(--control-hover); }
.action-sidebar button.active {
  background: transparent;
  color: var(--olive);
  border-color: transparent;
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--olive) 72%, var(--paper) 28%);
}
.action-sidebar button.active:hover {
  background: color-mix(in srgb, var(--olive) 9%, var(--control-bg));
}
.mobile-bottom-nav { display: none; }
.tabs { display: flex; gap: 8px; min-width: 0; overflow-x: auto; padding-bottom: 2px; }
.tab-main-nav { display: flex; gap: 8px; }
.mobile-menu-toggle { display: none; align-items: center; justify-content: space-between; gap: 10px;
                      width: 100%; background: var(--control-bg); color: var(--ink);
                      border: 1px solid var(--card-border); border-radius: var(--control-radius);
                      padding: 10px 12px; font: inherit; font-weight: 900; cursor: pointer; }
.mobile-floating-menu { display: none; }
.mobile-menu-toggle-copy { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.mobile-menu-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hamburger-icon { position: relative; display: inline-block; width: 18px; height: 2px;
                  border-radius: 999px; background: currentColor; flex: 0 0 auto; }
.hamburger-icon::before,
.hamburger-icon::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px;
                         border-radius: 999px; background: currentColor; }
.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { top: 6px; }
.mobile-menu-caret { flex: 0 0 auto; color: var(--muted); font-size: 12px; transform: rotate(0deg);
                     transition: transform 0.18s ease; }
.tab-stack.mobile-open .mobile-menu-caret { transform: rotate(180deg); }
.side-nav-label { display: none; color: var(--muted); font-size: 10px; font-weight: 900;
                  letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 4px 0; }
.tab-btn { background: var(--control-bg); color: var(--muted); border: 1px solid var(--card-border); border-radius: var(--control-radius);
           padding: 10px 14px; font-size: 14px; font-weight: 700; cursor: pointer; flex: 0 0 auto; white-space: nowrap;
           display: inline-flex; align-items: center; gap: 6px; position: relative; }
.action-tab {
  min-width: 132px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 8px 13px;
}
.action-tab .tab-icon { font-size: 18px; }
.tab-icon .plb-icon { width: 1.22em; height: 1.22em; }
.action-tab small {
  color: inherit;
  opacity: 0.82;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
}
.tab-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; opacity: 0.88; }
.tab-btn.active { background: var(--olive); color: #fbf6e8; border-color: var(--olive); }
.tab-notification-badge {
  position: absolute;
  top: 3px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c2410c;
  color: white;
  border: 1px solid var(--paper);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(47,43,36,0.18);
}
.tab-notification-badge[hidden] { display: none; }
.mobile-nav-badge {
  position: absolute;
  top: 5px;
  right: 9px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c2410c;
  color: white;
  border: 1px solid var(--paper);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(47,43,36,0.18);
}
.mobile-nav-badge[hidden] { display: none; }
.tab-btn.has-unread-info,
.tab-btn.has-admin-review { border-color: color-mix(in srgb, #c2410c 50%, var(--card-border)); padding-right: 24px; }
.tab-stack { display: flex; gap: 8px; grid-column: 2; grid-row: 1; justify-self: center; position: relative; }
@media (min-width: 641px) {
  .tab-stack.nav-can-scroll-left::before,
  .tab-stack.nav-can-scroll-right::after {
    position: sticky;
    z-index: 12;
    top: 0;
    width: 30px;
    min-width: 30px;
    height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--olive);
    font-size: 22px;
    font-weight: 900;
    pointer-events: none;
    text-shadow: 0 1px 0 var(--paper);
  }
  .tab-stack.nav-can-scroll-left::before {
    content: "‹";
    left: 0;
    margin-right: -30px;
    background: linear-gradient(90deg, var(--paper) 42%, rgba(255,250,238,0));
  }
  .tab-stack.nav-can-scroll-right::after {
    content: "›";
    right: 0;
    margin-left: -30px;
    background: linear-gradient(90deg, rgba(255,250,238,0), var(--paper) 58%);
  }
}
.side-pack-list { display: none; margin: -8px 0 16px 10px; padding-left: 12px; border-left: 2px solid rgba(93,79,56,0.18); max-width: 280px; }
.side-pack-list.active { display: grid; gap: 6px; }
.side-pack-item { background: var(--control-bg); color: var(--ink); border: 1px solid var(--card-border);
                  border-radius: var(--control-radius); padding: 7px 9px; font-size: 12px; cursor: pointer;
                  text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-pack-item:hover { background: var(--control-hover); }
.tab-panel { display: none; }
.tab-panel.active { display: block; margin-top: 0; }
@media (min-width: 901px) {
  .container {
    max-width: 1280px;
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding-top: 10px;
  }
  .action-sidebar { display: block; grid-row: 1; }
  .shared-card,
  .tab-panel,
  .site-footer {
    grid-column: 2;
    min-width: 0;
    align-self: start;
  }
  .shared-card,
  .tab-panel {
    grid-row: 1;
  }
  .site-footer {
    grid-row: 2;
  }
  .tab-panel > :first-child,
  .tab-panel.active > :first-child {
    margin-top: 0;
  }
  #home-tab .home-grid {
    width: 100%;
  }
  #diary-tab {
    margin-top: 0;
    padding-top: 0;
    align-self: start;
  }
  #diary-tab .field-card {
    margin-top: 0;
  }
}
/* HOME: landing-style entrance */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  grid-auto-flow: dense;
  gap: 16px;
  align-items: start;
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  margin: 0 auto;
  padding: 0 0 18px;
  background:
    linear-gradient(112deg, rgba(255,250,238,0.98) 0 36%, rgba(247,250,243,0.90) 55%, rgba(214,236,239,0.82) 100%),
    var(--paper);
  border: 1px solid rgba(197, 212, 215, 0.42);
}
.home-hero {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  min-height: clamp(360px, 37vw, 520px);
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid rgba(126,146,158,0.16);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(145deg, transparent 0 56%, rgba(126,174,190,0.15) 56% 57%, transparent 57%),
    linear-gradient(158deg, transparent 0 63%, rgba(80,108,120,0.12) 63% 64%, transparent 64%),
    radial-gradient(ellipse at 86% 50%, rgba(126,174,190,0.18), transparent 48%);
  opacity: 0.9;
}
.home-hero::after {
  content: "";
  position: absolute;
  right: -4vw;
  bottom: -1px;
  width: min(760px, 58vw);
  height: min(320px, 30vw);
  pointer-events: none;
  background:
    linear-gradient(142deg, transparent 0 18%, rgba(96,143,158,0.18) 18% 28%, transparent 28% 100%),
    linear-gradient(135deg, transparent 0 30%, rgba(105,160,178,0.30) 30% 43%, rgba(214,236,239,0.04) 43% 100%),
    linear-gradient(160deg, transparent 0 44%, rgba(69,97,107,0.18) 44% 57%, transparent 57% 100%);
  clip-path: polygon(0 100%, 16% 63%, 27% 76%, 43% 28%, 56% 58%, 70% 42%, 86% 68%, 100% 50%, 100% 100%);
}
.home-hero-shell {
  position: relative;
  z-index: 1;
  min-height: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "copy"
    "actions"
    "strip";
  gap: clamp(22px, 3vw, 34px);
  align-content: center;
  padding: clamp(34px, 6vw, 72px) clamp(28px, 8vw, 96px);
}
.home-hero-copy {
  grid-area: copy;
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}
.home-kicker {
  width: fit-content;
  color: rgba(255,250,238,0.76);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 11px;
  border: 1px solid rgba(255,250,238,0.22);
  border-radius: 999px;
  background: rgba(255,250,238,0.08);
}
.home-title {
  color: #172238;
  font-family: var(--font-main) !important;
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 1.02;
  font-weight: 920;
  letter-spacing: 0;
  max-width: 620px;
  text-wrap: balance;
}
.home-subtitle {
  color: #2f67ad;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.38;
  max-width: 560px;
  font-weight: 900;
}
.home-hero-lead { display: grid; gap: 6px; }
.home-hero-note {
  color: #24314a;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 780;
  line-height: 1.65;
  max-width: 560px;
}
.home-guest-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  width: min(100%, 640px);
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(90,113,73,0.22);
  border-radius: 8px;
  background: rgba(255,250,238,0.72);
  box-shadow: 0 12px 26px rgba(38,53,27,0.10);
}
.home-guest-entry[hidden] {
  display: none;
}
.home-guest-entry-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.home-guest-entry-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.25;
}
.home-guest-entry-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}
.home-guest-entry-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.home-guest-entry-actions button {
  white-space: nowrap;
}
.home-guide-cta {
  width: min(100%, 520px);
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 14px;
  align-items: center;
  margin-top: 4px;
  padding: 16px 18px;
  color: #fffaf0;
  text-decoration: none;
  border: 1px solid rgba(38,53,27,0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(57,86,42,0.96), rgba(47,103,173,0.92));
  box-shadow: 0 14px 30px rgba(38,53,27,0.18);
}
.home-guide-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(38,53,27,0.24);
  filter: brightness(1.03);
}
.home-guide-cta-main {
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
}
.home-guide-cta-sub {
  grid-column: 1;
  color: rgba(255,250,240,0.78);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}
.home-guide-cta-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 30px;
  line-height: 1;
  opacity: 0.78;
}
.home-hero-actions {
  grid-area: actions;
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}
.home-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1080px;
  justify-self: stretch;
  width: 100%;
}
.home-action-button {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  justify-content: stretch;
  padding: 14px 16px;
  text-align: left;
  border-radius: 8px;
  border: none;
  background: #2f67ad;
  box-shadow: 0 12px 28px rgba(33, 54, 84, 0.18);
  color: white;
  font-family: inherit;
  cursor: pointer;
}
.home-action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(33, 54, 84, 0.24);
  filter: brightness(1.04);
}
.home-action-button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 7px 14px rgba(10, 14, 9, 0.18);
}
.home-action-button:nth-child(1) { background: linear-gradient(135deg, #f2933b, #d96e21); }
.home-action-button:nth-child(2) { background: linear-gradient(135deg, #3f78c7, #285ca6); }
.home-action-button:nth-child(3) { background: linear-gradient(135deg, #46965b, #317b48); }
.home-action-button:nth-child(4) { background: linear-gradient(135deg, #8a65bb, #6b4ca3); }
.home-action-button:nth-child(5) { background: linear-gradient(135deg, #607f8f, #3f6475); }
.home-action-button:nth-child(6) { background: linear-gradient(135deg, #2f8f83, #216b63); }
.home-action-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,250,238,0.14);
  border: 1px solid rgba(255,250,238,0.24);
  color: #f0da9a;
  font-size: 20px;
  line-height: 1;
}
.home-action-icon .plb-icon {
  width: 28px;
  height: 28px;
}
.home-action-primary .home-action-icon {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.24);
  color: white;
}
.home-action-copy { display: grid; gap: 4px; min-width: 0; }
.home-action-title {
  font-size: 16px;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.home-action-note {
  color: rgba(255,250,238,0.70);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}
.home-action-primary .home-action-note { color: rgba(255,255,255,0.80); }
.home-action-arrow {
  color: currentColor;
  font-size: 26px;
  line-height: 1;
  opacity: 0.68;
}

.home-secondary-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 1080px;
  width: 100%;
}

.home-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid rgba(126,146,158,0.24);
  border-radius: 999px;
  background: rgba(255,255,255,0.58);
  color: var(--bluegray);
  padding: 7px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.home-secondary-action:hover {
  background: rgba(255,250,238,0.82);
  border-color: rgba(62,84,44,0.28);
  color: var(--olive);
}

.home-guide-secondary {
  background: rgba(255,255,255,0.36);
  color: color-mix(in srgb, var(--bluegray) 88%, var(--muted));
}

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

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

.plb-activity-modal {
  position: fixed;
  inset: 0;
  z-index: 2450;
  display: grid;
  place-items: center;
  padding: 18px;
}

.plb-activity-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 15, 0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.plb-activity-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  height: auto;
  max-height: min(86dvh, 680px);
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--olive) 28%);
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 94%, white 6%);
  box-shadow: 0 24px 70px rgba(20, 18, 15, 0.34);
}

.plb-activity-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.plb-activity-content {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.plb-activity-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-right: 36px;
}

.plb-activity-rank-badge {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: contain;
}

.plb-activity-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plb-activity-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.plb-activity-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

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

.plb-activity-stat,
.plb-activity-badge {
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--soft) 72%, var(--paper) 28%);
}

.plb-activity-stat span,
.plb-activity-section-title {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.plb-activity-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.plb-activity-stat small,
.plb-activity-badge small,
.plb-activity-info small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.plb-activity-info {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 68%, #f0b35f 32%);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 72%, #fff7ed 28%);
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.plb-activity-info small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plb-activity-badges {
  display: grid;
  gap: 8px;
}

.plb-activity-badge-list {
  display: grid;
  gap: 8px;
}

.plb-activity-badge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.plb-activity-badge > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--olive) 16%, var(--paper));
  color: var(--olive);
  font-size: 18px;
  font-weight: 900;
}

.plb-activity-badge strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

body.plb-activity-modal-open {
  overflow: hidden;
}

.plb-install-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 18px;
}

.plb-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 9, 0.76);
  backdrop-filter: blur(6px) saturate(0.78);
  -webkit-backdrop-filter: blur(6px) saturate(0.78);
}

.plb-install-dialog {
  position: relative;
  width: min(100%, 980px);
  max-height: min(86dvh, 720px);
  overflow: auto;
  border: 1px solid rgba(255, 250, 238, 0.72);
  border-radius: 14px;
  background: #fffaf0;
  color: #1f2619;
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.52);
  padding: 24px;
}

.plb-install-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(103, 123, 87, 0.32);
  border-radius: 999px;
  background: #f3ecd9;
  color: #1f2619;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.plb-install-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #244127;
  color: #fbf6e8;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 12px 26px rgba(36, 65, 39, 0.24);
}

.plb-install-copy {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.plb-install-kicker {
  color: #5d6f3d;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.plb-install-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  color: #1f2619;
}

.plb-install-copy p,
.plb-install-note {
  margin: 0;
  color: #394231;
  font-weight: 850;
  line-height: 1.55;
}

.plb-install-guide-image {
  margin: 16px 0 0;
  border: 1px solid rgba(103, 123, 87, 0.22);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.plb-install-guide-image img {
  display: block;
  width: 100%;
  height: auto;
}

.plb-install-steps {
  margin: 16px 0 0;
  padding-left: 24px;
  display: grid;
  gap: 9px;
  color: #1f2619;
  font-weight: 900;
  line-height: 1.55;
}

.plb-install-steps li::marker {
  color: #496a33;
  font-weight: 950;
}

.plb-install-note {
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px solid rgba(103, 123, 87, 0.30);
  border-radius: 10px;
  background: #f4efdf;
}

.plb-share-glyph {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 20px;
  margin-right: 5px;
  vertical-align: -4px;
}

.plb-share-glyph::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 1px;
  height: 12px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 3px;
  opacity: 0.9;
}

.plb-share-glyph::after {
  content: "↑";
  position: absolute;
  left: 50%;
  top: -3px;
  transform: translateX(-50%);
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
}

.plb-install-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .plb-install-modal {
    padding: 8px;
  }
  .plb-install-dialog {
    max-height: calc(100dvh - 16px);
    padding: 16px;
    border-radius: 12px;
  }
  .plb-install-copy h2 {
    padding-right: 42px;
    font-size: 21px;
  }
  .plb-install-guide-image {
    margin-top: 14px;
    border-radius: 10px;
  }
}

.plb-update-notice {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 2300;
  width: min(560px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 250, 238, 0.74);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 94%, white 6%);
  color: var(--ink);
  box-shadow: 0 18px 56px rgba(18, 22, 16, 0.28);
  transform: translateX(-50%);
}

.plb-update-notice[hidden] {
  display: none !important;
}

.plb-update-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.plb-update-kicker {
  color: var(--olive);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.plb-update-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.3;
}

.plb-update-body {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.45;
}

.plb-update-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.plb-update-actions .btn-primary,
.plb-update-actions .btn-clear {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.home-onboarding-strip {
  grid-area: strip;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  max-width: 1080px;
  border: 1px solid rgba(126,146,158,0.22);
  border-radius: 8px;
  background: rgba(255,255,255,0.68);
  padding: 14px 16px;
}
.home-onboarding-flow {
  color: #24314a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.03em;
}
.home-onboarding-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.65;
  margin-top: 3px;
}
.home-onboarding-link {
  color: #2f67ad;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(126,146,158,0.24);
  border-radius: 999px;
  padding: 9px 14px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.home-onboarding-link:hover {
  transform: translateY(-1px);
  background: rgba(255,250,238,0.18);
  border-color: rgba(240,218,154,0.44);
}
.home-panel {
  background: rgba(255,255,255,0.54);
  border: 1px solid rgba(126,146,158,0.20);
  border-radius: 8px;
  box-shadow: none;
  padding: 18px;
  display: grid;
  gap: 12px;
  backdrop-filter: blur(6px);
}
.home-panel[data-home-section="logs"] { grid-row: span 3; }
.home-panel[data-home-section="packs"],
.home-panel[data-home-section="diary"],
.home-panel[data-home-section="insights"] { grid-column: 2; }
.home-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.home-stat { background: rgba(255,250,238,0.62); border: 1px solid rgba(158,139,96,0.28); border-radius: var(--control-radius); padding: 12px; min-width: 0; overflow: hidden; }
.home-stat-label { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.home-stat-value { color: var(--olive); font-size: 23px; font-weight: 900; line-height: 1.1; margin-top: 6px; white-space: nowrap; overflow-wrap: normal; }
.home-stat-note { color: var(--muted); font-size: 11px; font-weight: 700; margin-top: 3px; }
.home-panel[hidden] { display: none; }
.home-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(93,79,56,0.14); padding-bottom: 10px; }
.home-panel-title { color: var(--ink); font-size: 16px; font-weight: 900; }
.home-panel-link { color: var(--bluegray); border: none; background: transparent; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.home-list { display: grid; gap: 8px; }
.home-list-item { display: grid; gap: 3px; padding: 10px 0; border-bottom: 1px solid rgba(93,79,56,0.10); }
.home-list-item:last-child { border-bottom: none; }
.home-list-item.has-thumb {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.home-list-thumb {
  width: 96px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(126,146,158,0.22);
  background: rgba(255,255,255,0.48);
}
.home-list-title { color: var(--ink); font-size: 14px; font-weight: 900; overflow-wrap: anywhere; }
.home-list-meta { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.45; }
.home-list-item[role="button"] {
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}
.home-list-item[role="button"]:hover {
  background: rgba(255,255,255,0.58);
}
.home-list-item[role="button"]:active {
  transform: translateY(1px);
  background: rgba(255,250,238,0.72);
}
.home-list-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.home-list-actions .btn-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.home-list-actions .btn-mini .plb-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}
.home-comment-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, #c2410c 88%, var(--paper));
  color: white;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(47,43,36,0.16);
}
.home-comment-badge[hidden] { display: none; }
.home-field-log-list { display: grid; gap: 10px; }
.home-field-log-item .home-field-log-stats { margin-top: 7px; }
.home-field-log-card {
  border: none;
  border-bottom: 1px solid rgba(93,79,56,0.10);
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.home-field-log-card:last-child { border-bottom: none; }
.home-field-log-content { display: grid; gap: 8px; min-width: 0; }
.home-field-log-thumb {
  width: 124px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(126,146,158,0.22);
  background: rgba(255,255,255,0.48);
}
.home-field-log-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.home-field-log-title { color: var(--ink); font-size: 14px; font-weight: 900; line-height: 1.35; overflow-wrap: anywhere; }
.home-field-log-meta { color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.45; }
.home-field-log-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.home-field-log-chip {
  background: var(--control-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  padding: 4px 8px;
}
.home-field-log-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.home-month-panel { grid-column: 2; }
.home-month-panel .home-stats { margin-bottom: 4px; }
.home-insight { color: var(--muted); font-size: 13px; line-height: 1.65; padding: 10px 12px; border: 1px dashed rgba(158,139,96,0.34); border-radius: var(--control-radius); background: rgba(255,250,238,0.38); }
.home-customizer { display: none; gap: 8px; }
.home-customizer.active { display: grid; }
.home-custom-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center;
                   padding: 8px 0; border-bottom: 1px solid rgba(93,79,56,0.10); }
.home-custom-row:last-child { border-bottom: none; }
.home-custom-row label { color: var(--ink); font-size: 13px; font-weight: 800; }
.home-custom-row input { width: 16px; height: 16px; accent-color: var(--olive); }
.mountain-layout, .campground-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr); gap: 16px; align-items: start; }
.mountain-layout.single-panel, .campground-layout.single-panel { grid-template-columns: 1fr; }
.discover-mode-grid { margin: 12px 0 14px; }
.db-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 14px; }
.db-entry-panel { border: 1px solid rgba(158,139,96,0.28); border-radius: var(--control-radius); background: rgba(255,250,238,0.52); padding: 12px; display: grid; gap: 9px; align-content: start; }
.db-entry-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.db-entry-form input, .db-entry-form select {
  background: var(--field-bg); color: var(--ink); border: 1px solid var(--card-border);
  border-radius: var(--control-radius); padding: 10px; font-family: inherit; font-size: 13px; outline: none; min-width: 0;
}
.db-entry-form .btn-pack { grid-column: 1 / -1; }
.mountain-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: center; }
.campground-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: center; }
.db-mobile-filter-bar,
.db-filter-sheet-head,
.db-filter-apply {
  display: none;
}
.db-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9400;
  background: rgba(15, 18, 16, 0.42);
}
.db-filter-backdrop[hidden] {
  display: none;
}
.mountain-tools input, .mountain-tools select, .mountain-plan-select, .mountain-plan-note,
.campground-tools input, .campground-tools select, .campground-plan-select, .campground-plan-note {
  background: var(--field-bg); color: var(--ink); border: 1px solid var(--card-border);
  border-radius: var(--control-radius); padding: 10px; font-family: inherit; font-size: 13px; outline: none;
}
.mountain-tools #mountain-search-text { grid-column: 1 / -1; min-width: 0; width: 100%; }
.campground-tools #campground-search-text { grid-column: 1 / -1; min-width: 0; width: 100%; }
.mountain-tools select, .campground-tools select { min-width: 0; width: 100%; }
.mountain-list, .mountain-plan-list, .campground-list, .campground-plan-list { display: grid; gap: 9px; margin-top: 12px; }
.mountain-card, .campground-card { background: rgba(255,250,238,0.58); border: 1px solid rgba(158,139,96,0.28);
                 border-radius: var(--control-radius); padding: 12px; display: grid; gap: 8px; }
.mountain-card-head, .campground-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.mountain-name, .campground-name { color: var(--ink); font-size: 16px; font-weight: 900; overflow-wrap: anywhere; }
.mountain-meta, .campground-meta { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.45; }
.mountain-source, .campground-source { color: var(--bluegray); font-size: 11px; font-weight: 800; line-height: 1.45; }
.search-load-more { display: flex; justify-content: center; padding: 8px 0 2px; }
.search-load-more .btn-clear { min-width: 180px; }
.mountain-viewer, .campground-viewer { display: none; margin-top: 12px; border: 1px solid rgba(158,139,96,0.30);
                   border-radius: var(--card-radius); overflow: hidden; background: rgba(255,250,238,0.58); }
.mountain-viewer.active, .campground-viewer.active { display: block; }
.mountain-viewer-grid, .campground-viewer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mountain-actions, .campground-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.db-suggestion-panel { display: none; position: fixed; inset: 0; z-index: 1200; background: rgba(41,49,43,0.42);
  padding: 24px; overflow: auto; }
.db-suggestion-panel.active { display: grid; place-items: start center; }
.db-suggestion-card { width: min(920px, 100%); background: var(--paper); border: 1px solid var(--card-border);
  border-radius: var(--card-radius); box-shadow: 0 24px 60px rgba(34,38,34,0.24); overflow: hidden;
  max-height: calc(100vh - 48px); display: grid; grid-template-rows: auto minmax(0, 1fr); }
.db-suggestion-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 16px 18px; border-bottom: 1px solid rgba(158,139,96,0.24); }
.db-suggestion-body { display: grid; gap: 12px; padding: 16px 18px; overflow: auto; min-height: 0; }
.db-suggestion-fields { display: grid; gap: 8px; padding-right: 4px; }
.db-suggestion-row { display: grid; grid-template-columns: minmax(110px, 0.35fr) minmax(0, 0.65fr) minmax(0, 0.8fr);
  gap: 8px; align-items: center; }
.db-suggestion-label { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.db-suggestion-current { color: var(--bluegray); font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.db-suggestion-row input, .db-suggestion-row select, .db-suggestion-body textarea {
  background: var(--field-bg); color: var(--ink); border: 1px solid var(--card-border);
  border-radius: var(--control-radius); padding: 9px 10px; font-family: inherit; font-size: 13px; outline: none;
}
.db-suggestion-body textarea { min-height: 74px; resize: vertical; }
.db-suggestion-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; position: sticky; bottom: -16px;
  background: var(--paper); border-top: 1px solid rgba(158,139,96,0.24); padding-top: 10px; padding-bottom: 4px; }
.mountain-badges, .campground-badges { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.mountain-badge, .campground-badge { color: #fbf6e8; background: var(--olive); border-radius: 999px; padding: 4px 8px;
                  font-size: 11px; font-weight: 900; white-space: nowrap; }
.mountain-badge.favorite, .campground-badge.favorite { background: var(--rust); }
.mountain-badge.source-official { background: var(--bluegray); }
.mountain-badge.source-user { background: var(--rust); }
.mountain-plan-select, .campground-plan-select { min-width: 180px; }
.mountain-plan-note, .campground-plan-note { width: 100%; min-height: 42px; resize: vertical; }
.location-weather-panel { display: none; margin-top: 10px; border: 1px solid rgba(92,111,83,0.22); background: rgba(245,248,240,0.78); border-radius: 8px; padding: 10px; }
.location-weather-panel.active { display: block; }
.location-weather-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.location-weather-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.location-weather-title { color: var(--ink); font-size: 13px; font-weight: 900; }
.location-weather-meta { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.45; }
.location-weather-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.location-weather-item { background: rgba(255,250,238,0.72); border: 1px solid rgba(158,139,96,0.22); border-radius: 7px; padding: 8px; }
.location-weather-label { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.location-weather-value { color: var(--ink); font-size: 13px; font-weight: 900; margin-top: 2px; overflow-wrap: anywhere; }
.location-weather-note { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.45; margin-top: 8px; }
body[data-theme="modern"] .location-weather-panel {
  background: rgba(15, 25, 27, 0.94);
  border-color: rgba(91, 203, 217, 0.32);
}
body[data-theme="modern"] .location-weather-item {
  background: rgba(25, 39, 43, 0.98);
  border-color: rgba(91, 203, 217, 0.22);
}
body[data-theme="modern"] .location-weather-title,
body[data-theme="modern"] .location-weather-value { color: #eaf8f5; }
body[data-theme="modern"] .location-weather-meta,
body[data-theme="modern"] .location-weather-label,
body[data-theme="modern"] .location-weather-note { color: #a9c8c5; }
.trip-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.trip-layout > * { min-width: 0; }
.trip-data-card {
  display: grid;
  gap: 12px;
}
.trip-data-card .trip-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.trip-data-card .trip-elevation {
  min-height: 112px;
}
.trip-data-card .trip-elevation svg {
  height: 112px;
}
.trip-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.trip-tools input[type="text"] {
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.trip-file-input { display: none; }
.trip-status { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.5; margin-top: 10px; }
.trip-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.trip-stat { background: rgba(255,250,238,0.58); border: 1px solid rgba(158,139,96,0.28); border-radius: var(--control-radius); padding: 11px; min-width: 0; }
.trip-stat-label { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.trip-stat-value { color: var(--olive); font-size: 20px; font-weight: 900; line-height: 1.15; margin-top: 5px; overflow-wrap: anywhere; }
.trip-elevation { margin-top: 12px; min-height: 150px; border: 1px solid rgba(158,139,96,0.28); border-radius: var(--control-radius); background: rgba(255,250,238,0.42); overflow: hidden; }
.trip-elevation svg { display: block; width: 100%; height: 150px; }
.trip-elevation svg#trip-elevation-svg { cursor: ew-resize; touch-action: none; }
.trip-builder { display: grid; gap: 9px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(93,79,56,0.14); }
.trip-builder[hidden] { display: none; }
.trip-builder *, .trip-tools *, .trip-playbar *, .trip-trim-editor *, .trip-export-panel *, .trip-export-pin-tools *, .trip-export-pin-list * { box-sizing: border-box; }
.trip-builder-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trip-builder-title { color: var(--ink); font-size: 14px; font-weight: 900; }
.trip-builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.trip-builder-grid input, .trip-point-row input {
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 9px 10px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
  min-width: 0;
}
.trip-point-list { display: grid; gap: 8px; }
.trip-point-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; align-items: center; padding: 9px; border: 1px solid rgba(158,139,96,0.22); border-radius: var(--control-radius); background: rgba(255,250,238,0.42); min-width: 0; }
.trip-point-row .btn-mini { min-height: 34px; }
.trip-builder-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: center; }
.trip-builder-actions button { min-width: 0; white-space: normal; line-height: 1.35; }
.trip-generated-gpx { width: 100%; min-height: 120px; resize: vertical; background: var(--field-bg); color: var(--ink); border: 1px solid var(--card-border); border-radius: var(--control-radius); padding: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.5; }
.trip-map-card {
  display: grid;
  grid-template-columns: minmax(520px, 1.55fr) minmax(340px, 0.9fr);
  grid-template-areas:
    "head head"
    "map trim"
    "play trim"
    "pinTools export";
  gap: 14px;
  align-items: start;
}
.trip-map-card > .pack-header { grid-area: head; }
.trip-map-shell {
  grid-area: map;
  position: relative;
  min-height: 520px;
  height: min(68vh, 680px);
  border: 1px solid rgba(158,139,96,0.30);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: #d8dfce;
}
#trip-map { position: absolute; inset: 0; }
.trip-map-center-point {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 2px solid #c95f24;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255,250,238,0.88), 0 4px 14px rgba(0,0,0,0.24);
  pointer-events: none;
  z-index: 3;
}
.trip-map-center-point::before,
.trip-map-center-point::after {
  content: "";
  position: absolute;
  background: #c95f24;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.trip-map-center-point::before { width: 30px; height: 2px; }
.trip-map-center-point::after { width: 2px; height: 30px; }
.trip-map-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; font-weight: 800; text-align: center; padding: 24px; pointer-events: none; z-index: 2; }
.trip-playbar { grid-area: play; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, 0.42fr); gap: 10px; align-items: center; }
.trip-playbar input[type="range"] { width: 100%; accent-color: var(--olive); }
.trip-speed-control { display: grid; gap: 3px; min-width: 0; }
.trip-speed-control label { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 6px; }
.trip-trim-editor {
  grid-area: trim;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(158,139,96,0.28);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.58);
  padding: 12px;
}
.trip-trim-editor[hidden] { display: none; }
.trip-trim-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trip-trim-stats .trip-stat { background: rgba(255,255,255,0.54); }
.trip-trim-stats .trip-stat-value { font-size: 15px; }
.trip-trim-range { display: grid; gap: 8px; }
.trip-trim-range label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.trip-trim-range label strong { color: var(--ink); font-size: 12px; text-transform: none; letter-spacing: 0; text-align: right; }
.trip-trim-range input[type="range"] { width: 100%; accent-color: var(--rust); }
.trip-trim-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; align-items: center; }
.trip-trim-actions button { min-width: 0; white-space: normal; line-height: 1.35; }
.trip-trim-note { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.5; }
.trip-export-panel {
  grid-area: export;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(77,114,128,0.28);
  border-radius: var(--control-radius);
  background: rgba(245,249,246,0.72);
  padding: 12px;
}
.trip-export-panel[hidden] { display: none; }
.trip-export-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.trip-export-stats .trip-stat { background: rgba(255,255,255,0.58); }
.trip-export-stats .trip-stat-value { font-size: 15px; }
.trip-export-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.trip-export-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.trip-export-grid input,
.trip-export-grid select {
  width: 100%;
  min-width: 0;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 9px 10px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}
.trip-export-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; align-items: center; }
.trip-export-actions button { min-width: 0; white-space: normal; line-height: 1.35; }
.trip-export-label-list { display: grid; gap: 7px; }
.trip-export-label-list-title { color: var(--ink); font-size: 12px; font-weight: 900; }
.trip-export-label-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.42);
}
.trip-export-label-name { color: var(--ink); font-size: 12px; font-weight: 900; overflow-wrap: anywhere; }
.trip-export-label-row input {
  width: 100%;
  min-width: 0;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 8px 9px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}
.trip-export-pin-tools { grid-area: pinTools; display: grid; gap: 8px; align-self: start; }
.trip-export-pin-tools[hidden] { display: none; }
.trip-export-pin-toolbar { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: center; }
.trip-export-pin-tools button { min-width: 0; }
.trip-map-center-toggle { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 900; white-space: nowrap; }
.trip-map-center-toggle input { accent-color: var(--rust); }
.trip-export-pin-list { display: grid; gap: 7px; }
.trip-export-pin-list[hidden] { display: none; }
.trip-export-pin-list-title { color: var(--ink); font-size: 12px; font-weight: 900; }
.trip-export-pin-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(190px, 1fr) minmax(160px, 0.9fr) auto;
  gap: 7px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.42);
}
.trip-export-pin-row input {
  width: 100%;
  min-width: 0;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 8px 9px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}
.trip-export-pin-time { color: var(--muted); font-size: 11px; font-weight: 900; overflow-wrap: anywhere; }
.trip-pin-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(42,36,27,0.34);
}
.trip-pin-modal-card {
  width: min(520px, 100%);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(158,139,96,0.32);
  border-radius: var(--card-radius);
  background: var(--paper);
  box-shadow: 0 18px 56px rgba(0,0,0,0.28);
}
.trip-pin-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.trip-pin-modal-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.trip-pin-modal-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}
.trip-pin-modal-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.trip-pin-modal-field input {
  width: 100%;
  min-width: 0;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 10px 11px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.trip-pin-modal-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  align-items: center;
}
.trip-pin-modal-actions button { min-width: 0; white-space: normal; }
.trip-pin-modal-actions .danger {
  border-color: rgba(154,65,43,0.28);
  color: #9a412b;
  background: rgba(154,65,43,0.08);
}
@media (max-width: 1180px) {
  .trip-map-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "map"
      "play"
      "pinTools"
      "trim"
      "pins"
      "export";
  }
  .trip-map-shell {
    min-height: 460px;
    height: min(62vh, 620px);
  }
  .trip-export-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .trip-export-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.trip-marker {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid #fffaf0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.28);
  transform: translateY(0) scale(1);
  transition: transform 130ms ease, box-shadow 130ms ease, filter 130ms ease;
}
.trip-marker.start { background: var(--olive); }
.trip-marker.end { background: var(--bluegray); }
.trip-marker.current { width: 20px; height: 20px; background: var(--rust); }
.trip-marker.custom { background: var(--rust); cursor: grab; }
.trip-custom-pin {
  position: relative;
  width: 0;
  height: 0;
  touch-action: none;
  user-select: none;
}
.trip-custom-pin .trip-marker.custom {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
}
.trip-custom-pin.is-pressing .trip-marker.custom {
  transform: translate(-50%, calc(-50% + 4px)) scale(0.88);
  box-shadow: 0 1px 4px rgba(0,0,0,0.34);
  filter: saturate(1.12);
  cursor: grabbing;
}
.trip-custom-pin .trip-marker-label {
  position: absolute;
  left: 0;
  top: 13px;
  max-width: 168px;
  margin-top: 0;
  transform: translateX(-50%);
  overflow: hidden;
  text-overflow: ellipsis;
}
.trip-custom-pin.is-pressing .trip-marker-label {
  transform: translate(-50%, 3px) scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.16);
}
.trip-marker-label {
  margin-top: 4px;
  transform: translateX(-34%);
  white-space: nowrap;
  color: var(--ink);
  background: rgba(255,250,238,0.92);
  border: 1px solid rgba(158,139,96,0.28);
  border-radius: var(--control-radius);
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 900;
  transition: transform 130ms ease, box-shadow 130ms ease;
}
.packs-workspace { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.pack-library-panel, .pack-detail-panel {
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 28px;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: 0 10px 28px var(--shadow);
}
.pack-library-panel { padding: 0; position: relative; top: auto; overflow: hidden; }
.pack-detail-panel { padding: 20px; min-width: 0; }
.pack-panel-header, .pack-detail-toolbar, .pack-list-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.pack-panel-header h2 { font-size: 18px; line-height: 1.2; }
.pack-panel-actions { display: grid; grid-template-columns: 1fr; gap: 6px; min-width: 96px; }
.pack-panel-actions .btn-add, .pack-panel-actions .btn-pack { width: 100%; padding: 8px 10px; font-size: 12px; white-space: nowrap; }
.pack-library-drawer summary { cursor: pointer; list-style: none; padding: 14px; }
.pack-library-drawer summary::-webkit-details-marker { display: none; }
.pack-library-drawer summary .pack-panel-header { align-items: center; }
.pack-library-drawer:not([open]) summary { border-bottom: none; }
.pack-library-drawer[open] summary { border-bottom: 1px solid rgba(93,79,56,0.14); }
.drawer-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.drawer-chevron { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center;
                  color: var(--muted); font-size: 13px; transition: transform .18s ease; flex-shrink: 0; }
details[open] > summary .drawer-chevron { transform: rotate(90deg); }
.pack-library-actions { margin: 8px 0 8px; }
.pack-library-list {
  margin: 0;
  max-height: 68vh;
  overflow: auto;
  padding: 8px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--olive) rgba(158,139,96,0.18);
}
.pack-library-list::-webkit-scrollbar { width: 8px; }
.pack-library-list::-webkit-scrollbar-track { background: rgba(158,139,96,0.16); border-radius: 999px; }
.pack-library-list::-webkit-scrollbar-thumb { background: var(--olive); border-radius: 999px; border: 2px solid rgba(255,250,238,0.72); }
.pack-detail-toolbar { align-items: center; border-bottom: 1px solid rgba(93,79,56,0.14); padding-bottom: 14px; margin-bottom: 12px; }
.pack-title-block { min-width: 0; }
.pack-title-block h2 { display: flex; align-items: center; gap: 8px; font-size: 30px; line-height: 1.15; color: var(--olive); }
.pack-title-block h2 span { min-width: 0; overflow-wrap: anywhere; }
.pack-primary-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pack-dashboard.compact { margin: 10px 0 18px; }
.pack-list-header { align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(93,79,56,0.14); }
.pack-list-actions, .packing-pack-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.packing-pack-tools { margin: -4px 0 10px; }
.pack-bulk-remove {
  border-color: rgba(135, 79, 58, 0.34);
  color: color-mix(in srgb, var(--rust) 86%, var(--ink) 14%);
  background: rgba(146, 91, 67, 0.08);
}
.pack-bulk-remove.is-active {
  background: color-mix(in srgb, var(--rust) 13%, var(--paper) 87%);
  box-shadow: inset 0 0 0 1px rgba(135,79,58,0.12);
}
.pack-bulk-remove:disabled {
  color: var(--muted);
  border-color: rgba(158,139,96,0.22);
  background: rgba(255,250,238,0.36);
  cursor: not-allowed;
  opacity: 0.72;
}
.pack-my-gears-drawer { margin: 10px 0 14px; border: 1px solid rgba(158,139,96,0.22); border-radius: var(--control-radius); background: rgba(255,250,238,0.34); }
.pack-my-gears-drawer summary { cursor: pointer; list-style: none; padding: 10px 12px; font-weight: 800; color: var(--ink); }
.pack-my-gears-drawer summary::-webkit-details-marker { display: none; }
.pack-my-gears-drawer .my-gear-grid { padding: 0 12px 12px; }
.pack-gear-list { display: grid; gap: 0; border: 1px solid rgba(158,139,96,0.28); border-radius: var(--control-radius); overflow: hidden; background: var(--card-fill); }
.packing-pack-list {
  min-height: 180px;
  border: 1px solid rgba(158,139,96,0.28);
  border-radius: var(--control-radius);
  overflow: hidden;
  background: var(--card-fill);
}
.packing-pack-list .pack-item { background: transparent; }
.packing-pack-list .pack-item-top { padding: 10px 12px; }
.packing-layout { display: grid; gap: 14px; }
.packing-pack-picker {
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: 0 10px 28px var(--shadow);
  padding: 16px 18px;
}
.packing-start-panel,
.packing-workspace {
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 18px;
}
.packing-start-panel { display: grid; gap: 14px; }
.packing-start-copy {
  display: grid;
  gap: 4px;
  max-width: 760px;
}
.packing-start-copy h2 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}
.packing-start-copy p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}
.packing-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.packing-mode-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 78px;
  padding: 14px;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid rgba(93,79,56,0.18);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.packing-mode-card:hover {
  border-color: rgba(94,113,73,0.45);
  background: color-mix(in srgb, var(--field-bg) 84%, var(--olive) 16%);
  transform: translateY(-1px);
}
.packing-mode-card.active {
  border-color: rgba(94,113,73,0.75);
  background: color-mix(in srgb, var(--field-bg) 76%, var(--olive) 24%);
}
.packing-mode-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(94,113,73,0.14);
  color: var(--olive);
  font-size: 18px;
  font-weight: 900;
}
.packing-mode-icon .plb-icon {
  width: 22px;
  height: 22px;
}
.packing-mode-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}
.packing-mode-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.packing-existing-picker {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(260px, 1fr);
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}
.packing-existing-picker[hidden],
.packing-workspace[hidden] { display: none; }
.packing-existing-picker select,
.packing-setup-grid input,
.packing-setup-grid select,
.packing-setup-grid textarea {
  width: 100%;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.packing-existing-picker select:focus,
.packing-setup-grid input:focus,
.packing-setup-grid select:focus,
.packing-setup-grid textarea:focus {
  border-color: rgba(94,113,73,0.68);
  box-shadow: 0 0 0 3px rgba(94,113,73,0.12);
}
.packing-workspace {
  display: grid;
  gap: 14px;
}
.packing-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.packing-workspace-head h2 {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}
.packing-workspace-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.packing-setup-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .8fr) minmax(180px, 1fr);
  gap: 8px;
}
.packing-setup-grid textarea {
  grid-column: 1 / -1;
  min-height: 58px;
  resize: vertical;
}
.packing-setup-grid input::placeholder,
.packing-setup-grid textarea::placeholder { color: #9b8d72; }
.packing-picker-grid { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: 8px; align-items: end; }
.packing-picker-field { display: grid; gap: 5px; min-width: 0; }
.packing-picker-field[hidden] { display: none; }
.packing-picker-label { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.packing-picker-help { color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 8px; }
.packing-picker-grid select {
  width: 100%;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 800;
}
.packing-workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.packing-panel { background: var(--paper); border: 1px solid var(--card-border); border-radius: var(--card-radius);
                 box-shadow: 0 10px 28px var(--shadow); padding: 18px; }
.packing-panel h2 { font-size: 16px; margin-bottom: 10px; }
.packing-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.packing-controls select { flex: 1; min-width: 180px; background: var(--field-bg); color: var(--ink);
                           border: 1px solid var(--card-border); border-radius: var(--control-radius);
                           padding: 9px 11px; font-size: 13px; font-family: inherit; }
.packing-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(158,139,96,0.28);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--field-bg) 82%, var(--olive) 18%);
}
.packing-summary-title { color: var(--ink); font-size: 13px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.packing-summary-meta { color: var(--muted); font-size: 11px; font-weight: 800; margin-top: 2px; }
.packing-summary-weight { color: var(--olive); font-size: 30px; font-weight: 900; line-height: 1; text-align: right; white-space: nowrap; }
.packing-summary-unit { color: var(--muted); font-size: 12px; font-weight: 800; margin-left: 3px; }
.packing-gear-tools { display: grid; gap: 8px; margin: 8px 0 12px; }
.packing-gear-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 200px) minmax(96px, auto);
  gap: 8px;
  align-items: center;
}
.packing-gear-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.packing-gear-action-row .btn-pack { min-width: 132px; }
.packing-gear-action-row .btn-primary { min-width: 172px; }
.packing-gear-tools input, .packing-gear-tools select {
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 9px 11px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.packing-gear-meta { color: var(--muted); font-size: 12px; font-weight: 800; margin: 10px 0 4px; }
.packing-gear-list { display: grid; gap: 0; border: 1px solid rgba(158,139,96,0.28); border-radius: var(--control-radius); overflow: hidden; background: var(--card-fill); }
.packing-gear-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 82px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(93,79,56,0.14);
}
.packing-gear-row:last-child { border-bottom: none; }
.packing-gear-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--olive); }
.packing-gear-main { min-width: 0; }
.packing-gear-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.packing-gear-sub { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.packing-gear-weight { color: var(--olive); font-weight: 900; text-align: right; white-space: nowrap; }
.my-gear-start-panel,
.gear-db-start-panel,
.gear-db-workspace,
.field-log-start-panel,
.field-log-compose-panel,
.field-log-library-panel,
.my-gear-add-panel {
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.my-gear-start-panel[hidden],
.gear-db-start-panel[hidden],
.gear-db-workspace[hidden],
.field-log-start-panel[hidden],
.field-log-compose-panel[hidden],
.field-log-library-panel[hidden],
.my-gear-add-panel[hidden],
.my-gear-library-panel[hidden],
.my-gear-add-section[hidden] { display: none; }
.my-gear-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gear-db-start-panel,
.gear-db-workspace,
.field-log-start-panel,
.field-log-compose-panel,
.field-log-library-panel { display: grid; gap: 14px; }
.field-log-compose-panel,
.field-log-library-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.field-log-compose-panel { margin-bottom: 0; }
.gear-db-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gear-db-mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding: 4px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--field-bg) 84%, var(--paper) 16%);
}
.gear-db-mode-switch button {
  min-height: 34px;
  border: 0;
  border-radius: calc(var(--control-radius) - 2px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 11px;
}
.gear-db-mode-switch button.active {
  background: var(--olive);
  color: white;
  box-shadow: 0 6px 14px rgba(47, 55, 36, 0.18);
}
.gear-db-workspace.mode-community #gear-db-mode-label {
  background: color-mix(in srgb, var(--olive) 18%, var(--field-bg));
  border-color: color-mix(in srgb, var(--olive) 42%, var(--card-border));
  color: var(--olive);
}
.gear-db-workspace.mode-official #gear-db-mode-label {
  background: color-mix(in srgb, var(--bluegray) 16%, var(--field-bg));
  border-color: color-mix(in srgb, var(--bluegray) 34%, var(--card-border));
  color: var(--bluegray);
}
.field-log-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gear-db-community-sort {
  display: none;
}
.gear-db-workspace.mode-community .gear-db-community-sort {
  display: block;
}
.gear-db-official-card {
  border-left: 4px solid color-mix(in srgb, var(--olive) 54%, var(--card-border));
}
.gear-db-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.gear-db-official-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.gear-db-official-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  border: 1px solid color-mix(in srgb, var(--olive) 22%, var(--card-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--field-bg) 76%, var(--paper) 24%);
  padding: 2px 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}
.gear-db-official-meta b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.gear-db-detail-line {
  line-height: 1.55;
}
.gear-db-community-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
}
.gear-db-card-photo {
  grid-row: span 4;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: 8px;
  background: color-mix(in srgb, var(--field-bg) 84%, var(--paper) 16%);
  color: var(--muted);
  overflow: hidden;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}
.gear-db-card-photo img,
.gear-db-viewer-photo {
  display: block;
  width: 100%;
  object-fit: cover;
}
.gear-db-card-photo img {
  height: 100%;
}
.gear-db-viewer-photo {
  max-height: min(56vh, 520px);
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: 8px;
  background: var(--field-bg);
}
.my-gear-add-mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}
.my-gear-add-mode-grid .packing-mode-icon { font-size: 13px; }
.my-gear-compact-hint,
.my-gear-section-copy {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}
.my-gear-help-drawer,
.my-gear-bulk-panel {
  margin-top: 10px;
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.34);
}
.my-gear-help-drawer summary,
.my-gear-bulk-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.my-gear-help-drawer summary::-webkit-details-marker,
.my-gear-bulk-panel summary::-webkit-details-marker { display: none; }
.my-gear-help-body {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px 36px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}
.my-gear-bulk-panel {
  padding: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 28px;
  box-shadow: 0 10px 28px var(--shadow);
}
.my-gear-bulk-panel[open] summary { border-bottom: 1px solid rgba(93,79,56,0.14); }
.my-gear-bulk-summary {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.my-gear-bulk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}
.my-gear-bulk-box {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(158,139,96,0.26);
  border-radius: 8px;
  background: var(--card-fill);
}
.my-gear-bulk-box h3 {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}
.my-gear-bulk-box p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}
.my-gear-import-status {
  color: var(--olive);
  font-size: 12px;
  font-weight: 900;
}
.my-gear-import-preview {
  display: grid;
  gap: 6px;
}
.my-gear-import-row {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.42);
  min-width: 0;
}
.my-gear-import-row strong {
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.my-gear-import-row span,
.my-gear-import-row.muted {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

/* 検索カード */
.search-card { background:
                 linear-gradient(var(--line) 1px, transparent 1px),
                 var(--paper);
               background-size: 100% 28px;
               border: 1px solid var(--card-border); border-radius: var(--card-radius); padding: 24px;
               box-shadow: 0 10px 28px var(--shadow); margin-bottom: 16px; }
.search-card h2 { font-size: 14px; color: var(--muted); margin-bottom: 12px; letter-spacing: 0.04em; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; border: 1px solid var(--card-border); border-radius: var(--control-radius);
                   padding: 11px 14px; font-size: 14px; outline: none;
                   transition: border-color .2s; background: var(--field-bg); color: var(--ink); }
.input-row input:focus { border-color: var(--olive); }
.btn-primary { background: var(--olive); color: #fffaf0; border: none; border-radius: var(--control-radius);
               padding: 11px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
               transition: background .2s; white-space: nowrap; }
.btn-primary:hover { background: #2e421d; }
.btn-primary:disabled { background: #9aa989; cursor: not-allowed; }
.btn-clear { background: var(--control-bg); color: var(--ink); border: 1px solid var(--card-border); border-radius: var(--control-radius);
             padding: 11px 14px; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none;
             display: inline-flex; align-items: center; justify-content: center; }
.btn-clear:hover { background: var(--control-hover); }
.history-area { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.history-chip { background: var(--control-bg); color: var(--bluegray); border: 1px solid var(--card-border); border-radius: var(--control-radius);
                padding: 4px 12px; font-size: 12px; cursor: pointer; max-width: 300px;
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-chip:hover { background: var(--control-hover); }
.history-label { font-size: 12px; color: var(--muted); align-self: center; }

/* AI対応バッジ */
.ai-badge { background: #efe6d2; border: 1px dashed #bca979; border-radius: 4px; padding: 10px 14px;
            font-size: 13px; color: var(--bluegray); margin-bottom: 16px;
            display: flex; align-items: center; gap: 8px; }
.brand-profile-hint {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--field-bg) 88%, var(--paper) 12%);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.brand-profile-hint.active { display: flex; }
.brand-profile-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 900;
  color: var(--ink);
  background: var(--control-bg);
}
.brand-profile-badge.auto_preferred { color: var(--olive); background: color-mix(in srgb, var(--field-bg) 70%, var(--olive) 30%); }
.brand-profile-badge.auto_with_review { color: #8a5a14; background: color-mix(in srgb, var(--field-bg) 70%, #d8a84c 30%); }
.brand-profile-badge.render_or_fallback { color: var(--bluegray); background: color-mix(in srgb, var(--field-bg) 70%, var(--bluegray) 30%); }
.brand-profile-badge.manual_preferred { color: #8f3d2e; background: color-mix(in srgb, var(--field-bg) 70%, #d77a61 30%); }
.brand-profile-copy strong { color: var(--ink); }
.brand-profile-copy .brand-profile-notes { display: block; margin-top: 2px; font-size: 11px; opacity: .86; }

/* ローディング */
.loading { display: none; text-align: center; padding: 20px; color: #888; font-size: 14px; }
.spinner { width: 28px; height: 28px; border: 3px solid #e0e0e0;
           border-top-color: #6366f1; border-radius: 50%;
           animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ギアカード */
.gear-card { background:
               linear-gradient(var(--line) 1px, transparent 1px),
               var(--paper);
             background-size: 100% 28px;
             border: 1px solid var(--card-border); border-radius: var(--card-radius); padding: 24px;
             box-shadow: 0 10px 28px var(--shadow); margin-bottom: 16px;
             animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; } }
.gear-header { display: flex; justify-content: space-between; align-items: flex-start;
               margin-bottom: 16px; }
.gear-name { font-size: 18px; font-weight: 700; line-height: 1.3; }
.gear-brand { font-size: 13px; color: var(--muted); margin-top: 3px; }
.category-badge { background: transparent; color: var(--rust); font-size: 12px;
                  font-weight: 800; padding: 4px 12px; border: 1px solid var(--rust); border-radius: 999px;
                  white-space: nowrap; margin-left: 12px; flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; }
.weight-highlight { background: rgba(223,231,207,0.75);
                    border: 1px solid #c0cba8; border-radius: 5px; padding: 14px 18px; margin-bottom: 14px;
                    display: flex; align-items: center; gap: 8px; }
.weight-highlight.missing { background: rgba(246,238,218,0.72); border-color: rgba(163,79,34,0.34); }
.weight-number { font-size: 34px; font-weight: 800; color: var(--olive); line-height: 1; }
.weight-number.text { font-size: 22px; color: var(--rust); }
.weight-unit { font-size: 15px; color: var(--olive); font-weight: 600; }
.weight-raw { font-size: 12px; color: var(--muted); margin-left: 8px; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.spec-item { background: rgba(255,250,238,0.58); border: 1px solid rgba(158,139,96,0.28); border-radius: 4px; padding: 10px 14px; }
.spec-label { font-size: 11px; color: var(--muted); font-weight: 700;
              text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.spec-value { font-size: 13px; color: var(--ink); font-weight: 500; line-height: 1.4; }
.spec-full { grid-column: 1 / -1; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.edit-field { display: grid; gap: 4px; }
.edit-field label { font-size: 11px; color: var(--muted); font-weight: 700; }
.edit-field input, .edit-field select, .edit-field textarea {
  border: 1px solid var(--card-border); border-radius: var(--control-radius); padding: 9px 11px;
  font-size: 13px; outline: none; font-family: inherit; background: var(--field-bg);
}
.edit-field textarea { min-height: 68px; resize: vertical; }
.edit-full { grid-column: 1 / -1; }
.gear-photo-editor { align-items: start; }
.gear-photo-preview {
  width: min(460px, 100%);
  min-height: 130px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  overflow: hidden;
  background: color-mix(in srgb, var(--field-bg) 80%, white 8%);
  display: grid;
  place-items: center;
}
.gear-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gear-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 8px;
}
.gear-photo-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(158,139,96,0.30);
  border-radius: var(--control-radius);
  background: var(--field-bg);
}
.gear-photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,250,238,0.8);
  border-radius: 999px;
  background: rgba(38,53,27,0.78);
  color: #fffaf0;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.gear-photo-order-actions {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: flex;
  gap: 4px;
}
.gear-photo-order-actions button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  border: 1px solid rgba(255,250,238,0.8);
  border-radius: 999px;
  background: rgba(38,53,27,0.78);
  color: #fffaf0;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.gear-photo-order-actions button:disabled {
  opacity: .38;
  cursor: not-allowed;
}
.gear-photo-add-tile {
  aspect-ratio: 4 / 3;
  border: 1px dashed rgba(158,139,96,0.44);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.42);
  color: var(--olive);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}
.photo-drop-zone {
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.photo-drop-zone.drag-over {
  border-color: var(--olive);
  background: color-mix(in srgb, var(--field-bg) 72%, var(--olive) 18%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--olive) 30%, transparent);
}
.gear-photo-empty { color: var(--muted); font-size: 12px; font-weight: 800; padding: 12px; text-align: center; }
.gear-photo-input { display: none; }
.gear-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gear-photo-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-add { background: var(--olive); color: #fffaf0; border: none; border-radius: var(--control-radius);
           padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-add:hover { background: #2e421d; }
.btn-link { background: var(--control-bg); color: var(--ink); border: 1px solid var(--card-border); border-radius: var(--control-radius);
            padding: 10px 18px; font-size: 14px; cursor: pointer; text-decoration: none;
            display: inline-flex; align-items: center; gap: 6px; }
.btn-link:hover { background: var(--control-hover); }
.btn-amazon { background: #c77831; color: #24170d; border: none; border-radius: var(--control-radius);
              padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
              text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-amazon:hover { background: #d58a42; }
.btn-amazon:disabled { background: #fcd68a; cursor: not-allowed; }
.amazon-associate-link {
  background: color-mix(in srgb, #d58a42 22%, var(--control-bg) 78%);
  border-color: rgba(199,120,49,0.34);
  color: color-mix(in srgb, #6f3f16 82%, var(--ink) 18%);
}
.amazon-associate-link small {
  color: color-mix(in srgb, #6f3f16 62%, var(--muted) 38%);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.amazon-associate-link:hover {
  background: color-mix(in srgb, #d58a42 34%, var(--control-hover) 66%);
}

/* マイパック */
.pack-card { background:
               linear-gradient(var(--line) 1px, transparent 1px),
               var(--paper);
             background-size: 100% 28px;
             color: var(--ink); border: 1px solid var(--card-border); border-radius: var(--card-radius);
             padding: 24px; margin-bottom: 16px; box-shadow: 0 10px 28px var(--shadow); }
.pack-header { display: flex; justify-content: space-between; align-items: center;
               margin-bottom: 16px; }
.pack-header h2 { font-size: 16px; font-weight: 600; }
.pack-header h2 span { color: var(--olive) !important; }
.pack-header h2:has(.heading-plb-icon) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.heading-plb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--olive);
}
.heading-plb-icon .plb-icon {
  width: 1.15em;
  height: 1.15em;
}
.pack-title-display { display: inline-flex; align-items: center; gap: 8px; font-size: 28px; font-weight: 900; line-height: 1.1; color: var(--olive); }
.pack-title-edit-btn {
  background: var(--control-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}
.pack-title-edit-btn:hover { background: var(--control-hover); color: var(--ink); }
.pack-total { text-align: right; }
.total-weight { font-size: 38px; font-weight: 800; color: var(--olive); line-height: 1; }
.total-unit { font-size: 16px; color: var(--olive); }
.total-sub { font-size: 12px; color: var(--olive); margin-top: 2px; }
.pack-dashboard { margin: 10px 0 18px; display: grid; gap: 16px; }
.pack-hero { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 18px; align-items: start; }
.pack-kicker { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
.pack-dashboard-title { font-size: 31px; font-weight: 800; line-height: 1.1; margin-bottom: 7px; }
.pack-dashboard-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pack-dashboard-tag { background: var(--control-bg); color: var(--ink); border: 1px solid var(--card-border);
                      border-radius: var(--control-radius); padding: 4px 9px; font-size: 12px; font-weight: 700;
                      display: inline-flex; align-items: center; gap: 5px; }
.pack-dashboard-desc { color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 600px; }
.pack-illustration { min-height: 108px; border: 1px solid rgba(158,139,96,0.28); border-radius: var(--card-radius);
                     background:
                       radial-gradient(ellipse at 78% 64%, color-mix(in srgb, var(--olive) 16%, transparent) 0 30%, transparent 31%),
                       linear-gradient(135deg, transparent 0 42%, color-mix(in srgb, var(--olive) 22%, transparent) 42% 44%, transparent 44%),
                       linear-gradient(45deg, transparent 0 50%, color-mix(in srgb, var(--bluegray) 18%, transparent) 50% 52%, transparent 52%),
                       var(--card-fill);
                     position: relative; overflow: hidden; }
.pack-illustration::before { content: "△ △ △"; position: absolute; left: 22px; bottom: 22px; color: var(--olive);
                             font-size: 26px; letter-spacing: -7px; opacity: 0.66; transform: scaleY(1.4); }
.pack-illustration::after { content: "PACK"; position: absolute; right: 15px; bottom: 13px; color: var(--muted);
                            font-size: 10px; font-weight: 900; letter-spacing: 0.18em; transform: rotate(-5deg); }
.pack-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pack-stat { background: var(--card-fill); border: 1px solid rgba(158,139,96,0.28); border-radius: var(--card-radius);
             padding: 13px 14px; text-align: center; }
.pack-stat-label { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.pack-stat-value { margin-top: 4px; color: var(--ink); font-size: 25px; font-weight: 900; line-height: 1; }
.pack-stat-unit { color: var(--muted); font-size: 12px; font-weight: 700; margin-left: 2px; }
.pack-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: stretch; }
.pack-summary-panel {
  background: var(--card-fill); border: 1px solid rgba(158,139,96,0.28);
  border-radius: var(--card-radius); padding: 14px;
}
.pack-section-label { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: 0.08em;
                      text-transform: uppercase; margin-bottom: 8px; }
.pack-category-list { display: grid; gap: 2px; }
.pack-category-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 70px; gap: 10px; align-items: center;
                     padding: 8px 0; border-bottom: 1px solid rgba(93,79,56,0.14); font-size: 13px; }
.pack-category-row:last-child { border-bottom: none; }
.pack-category-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-category-weight, .pack-category-count { color: var(--muted); text-align: right; font-weight: 700; }
.pack-editor-label { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: 0.12em;
                     text-transform: uppercase; margin: 16px 0 8px; }
.pack-item { background: transparent; border-bottom: 1px solid rgba(93,79,56,0.14); padding: 0; margin: 0; }
.pack-item:last-child { border-bottom: none; }
.pack-item[draggable="true"] { cursor: grab; }
.pack-item.dragging-pack-item { opacity: 0.48; background: color-mix(in srgb, var(--field-bg) 72%, var(--olive) 28%); }
.pack-drag-handle { color: var(--muted); font-size: 15px; font-weight: 900; cursor: grab; user-select: none; }
.pack-item-top { display: grid; grid-template-columns: 24px 32px 120px minmax(0, 1fr) 92px auto; gap: 12px; align-items: center; padding: 11px 12px; }
.pack-check {
  width: 22px;
  height: 22px;
  accent-color: var(--olive);
  cursor: pointer;
}
.pack-item.checked .pack-item-name { text-decoration: line-through; color: color-mix(in srgb, var(--ink) 62%, var(--muted)); }
.pack-item.checked .pack-item-brand,
.pack-item.checked .pack-item-category,
.pack-item.checked .pack-item-weight { opacity: 0.72; }
.pack-item-category { color: var(--muted); font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-item-name { font-size: 14px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.pack-item-brand { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-item-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.pack-item-weight { color: var(--olive); font-weight: 900; font-size: 15px; text-align: right; }
.pack-item-remove { color: var(--rust); background: none; border: none;
                    cursor: pointer; font-size: 18px; line-height: 1; }
.pack-item-specs { padding: 0 12px 10px 144px; display: flex; flex-wrap: wrap; gap: 6px; }
.pack-spec-chip, .pack-spec-link { background: #e8ddc5; border: 1px solid rgba(158,139,96,0.28); border-radius: 4px;
                  padding: 3px 8px; font-size: 11px; color: var(--muted); }
.pack-spec-link { color: var(--bluegray); text-decoration: none; font-weight: 700; }
.pack-spec-link:hover { background: #f2e8d0; }
.pack-item-link { color: var(--bluegray); font-size: 12px; text-decoration: none;
                  margin-top: 6px; display: inline-block; }
.pack-item-link:hover { color: var(--rust); }
.app-guide { margin-top: 18px; border: 1px solid rgba(158,139,96,0.28); border-radius: var(--card-radius);
             background: rgba(255,250,238,0.42); }
.app-guide summary { cursor: pointer; list-style: none; padding: 12px 14px; color: var(--ink); font-weight: 900; }
.app-guide summary::-webkit-details-marker { display: none; }
.app-guide-body { padding: 0 14px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app-guide-section { border-top: 1px solid rgba(93,79,56,0.14); padding-top: 12px; }
.app-guide-section h3 { color: var(--ink); font-size: 13px; margin-bottom: 6px; }
.app-guide-section p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.pack-item-detail { padding: 12px; border-top: 1px solid rgba(93,79,56,0.14); background: rgba(255,250,238,0.38); }
.pack-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pack-edit-grid label { color: var(--muted); font-size: 11px; font-weight: 700; }
.pack-edit-grid input, .pack-edit-grid select, .pack-edit-grid textarea {
  width: 100%; background: var(--field-bg); color: var(--ink);
  border: 1px solid var(--card-border); border-radius: var(--control-radius);
  padding: 8px 10px; font-size: 12px; outline: none; font-family: inherit;
}
.pack-edit-grid textarea { min-height: 58px; resize: vertical; }
.pack-edit-grid option { color: #111; }
.pack-edit-full { grid-column: 1 / -1; }
.pack-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pack-check-progress { color: var(--muted); font-size: 12px; font-weight: 800; margin-top: 4px; }
.btn-pack { background: var(--control-bg); color: var(--ink); border: 1px solid var(--card-border);
            border-radius: var(--control-radius); padding: 9px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-pack:hover { background: var(--control-hover); }
.pack-title-row { display: none; gap: 8px; margin-bottom: 14px; }
.pack-title-row.active { display: flex; }
.pack-title-row input { flex: 1; background: var(--field-bg); color: var(--ink);
                        border: 1px solid var(--card-border); border-radius: var(--control-radius);
                        padding: 10px 12px; font-size: 14px; outline: none; }
.pack-title-row input::placeholder { color: #9b8d72; }
.pack-context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pack-context-grid input, .pack-context-grid select, .pack-context-grid textarea {
  background: var(--field-bg); color: var(--ink); border: 1px solid var(--card-border);
  border-radius: var(--control-radius); padding: 10px 12px; font-size: 13px; outline: none; font-family: inherit;
}
.pack-context-grid textarea { grid-column: 1 / -1; min-height: 66px; resize: vertical; }
.pack-context-grid input::placeholder, .pack-context-grid textarea::placeholder { color: #9b8d72; }
.pack-context-grid option { color: #111; }
.cloud-list { margin-top: 14px; display: grid; gap: 8px; }
.cloud-item { background: var(--card-fill); border: 1px solid rgba(158,139,96,0.28);
              border-radius: var(--control-radius); padding: 10px 12px; display: flex; align-items: center;
              justify-content: space-between; gap: 12px; }
.cloud-item-title { color: var(--ink); font-size: 13px; font-weight: 700; }
.cloud-item-meta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.cloud-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pack-cloud-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: stretch; padding: 10px; min-width: 0; }
.pack-cloud-info { min-width: 0; overflow: hidden; }
.pack-cloud-item .cloud-item-title {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 900;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}
.pack-cloud-item .cloud-item-meta { line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-cloud-actions { display: flex; gap: 3px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; max-width: none; justify-self: end; }
.pack-cloud-actions .pack-public-toggle { justify-content: center; padding: 4px 5px 4px 4px; min-height: 27px; white-space: nowrap; flex: 0 0 auto; font-size: 10px; }
.pack-cloud-actions .pack-public-toggle .toggle-track { width: 22px; height: 13px; }
.pack-cloud-actions .pack-public-toggle .toggle-track::after { width: 9px; height: 9px; }
.pack-cloud-actions .pack-public-toggle.active .toggle-track::after { transform: translateX(9px); }
.pack-cloud-actions .btn-mini { min-height: 27px; padding: 4px 6px; font-size: 10px; font-weight: 900; flex: 0 0 auto; }
.btn-mini { background: var(--control-bg); color: var(--ink); border: 1px solid var(--card-border);
            border-radius: var(--control-radius); padding: 6px 9px; font-size: 12px; cursor: pointer; }
.btn-mini:hover { background: var(--control-hover); }
.my-gear-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.my-gear-bulk-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.my-gear-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.pack-my-gear-filter {
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 200px) auto;
  margin: 10px 0 6px;
}
.my-gear-filter input, .my-gear-filter select {
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 9px 11px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.my-gear-filter-meta { color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.my-gear-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.explore-card { max-width: 1120px; margin: 0 auto 18px; }
.explore-controls { display: grid; gap: 10px; margin-top: 12px; }
.explore-author-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--olive) 24%, var(--card-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--field-bg) 82%, var(--olive-soft) 18%);
  color: var(--ink);
  padding: 5px 7px 5px 11px;
  font-size: 12px;
  font-weight: 800;
}
.explore-author-filter .explore-author-clear {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
}
.explore-mode-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.explore-mode-btn {
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: var(--control-bg);
  color: var(--muted);
  min-height: 34px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.explore-mode-btn.active {
  background: var(--olive);
  border-color: var(--olive);
  color: white;
}
.explore-filter-grid {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(150px, 210px) minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.explore-filter-grid input, .explore-filter-grid select {
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 9px 11px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  min-width: 0;
}
.explore-grid { align-items: stretch; }
.explore-card-item { min-height: 100%; }
.explore-card-item .public-engagement { margin-top: 0; }
.public-diary-card,
.public-field-log-card {
  cursor: pointer;
}
.public-diary-card:focus-visible,
.public-field-log-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--olive) 48%, transparent);
  outline-offset: 3px;
}
.public-diary-card-actions,
.public-field-log-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.public-diary-viewer-text {
  font-weight: 800;
}
.public-diary-viewer-actions {
  display: grid;
  gap: 8px;
}
.explore-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.explore-photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--card-radius) - 4px);
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.45);
  box-shadow: var(--shadow-soft);
}
.explore-photo-strip .explore-photo-thumb:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}
.explore-photo-count {
  align-self: stretch;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--card-radius) - 4px);
  border: 1px dashed var(--card-border);
  background: color-mix(in srgb, var(--field-bg) 76%, var(--olive) 24%);
  color: var(--olive);
  font-size: 12px;
  font-weight: 900;
}
.explore-card-type {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.my-gear-card {
  background: var(--card-fill);
  border: 1px solid rgba(158,139,96,0.30);
  border-radius: var(--card-radius);
  padding: 14px;
  display: grid;
  gap: 9px;
  cursor: grab;
}
.my-gear-card:active { cursor: grabbing; }
body.dragging-my-gear, body.dragging-my-gear * { cursor: grabbing !important; }
.my-gear-main { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.my-gear-main > div { min-width: 0; }
.my-gear-photo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: cover;
  border-radius: var(--control-radius);
  border: 1px solid rgba(158,139,96,0.28);
  background: var(--field-bg);
}
.my-gear-name { font-weight: 800; color: var(--ink); font-size: 14px; }
.my-gear-meta { color: var(--muted); font-size: 12px; line-height: 1.5; }
.my-gear-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gear-visibility {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(158,139,96,0.28);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  background: rgba(255,250,238,0.48);
  font-size: 11px;
  font-weight: 800;
}
.gear-visibility.public { color: var(--olive); background: color-mix(in srgb, var(--field-bg) 74%, var(--olive) 26%); }
.gear-visibility.community { color: var(--bluegray); background: color-mix(in srgb, var(--field-bg) 72%, var(--bluegray) 28%); }
.gear-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.gear-public-toggle {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(158,139,96,0.34);
  border-radius: 999px;
  padding: 4px 9px 4px 4px;
  background: rgba(255,250,238,0.55);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.gear-public-toggle .toggle-track {
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: rgba(93,79,56,0.22);
  position: relative;
  transition: background 0.18s ease;
}
.gear-public-toggle .toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.18s ease;
}
.gear-public-toggle.active {
  color: var(--olive);
  background: color-mix(in srgb, var(--field-bg) 74%, var(--olive) 26%);
}
.gear-public-toggle.active .toggle-track { background: var(--olive); }
.gear-public-toggle.active .toggle-track::after { transform: translateX(14px); }
.pack-public-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(158,139,96,0.34);
  border-radius: 999px;
  padding: 4px 8px 4px 4px;
  background: rgba(255,250,238,0.55);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.pack-public-toggle .toggle-track {
  width: 28px;
  height: 15px;
  border-radius: 999px;
  background: rgba(93,79,56,0.22);
  position: relative;
}
.pack-public-toggle .toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.18s ease;
}
.pack-public-toggle.active { color: var(--olive); background: color-mix(in srgb, var(--field-bg) 74%, var(--olive) 26%); }
.pack-public-toggle.active .toggle-track { background: var(--olive); }
.pack-public-toggle.active .toggle-track::after { transform: translateX(13px); }
.public-gear-results { margin-top: 12px; }
.pack-drop-active {
  outline: 2px dashed var(--rust);
  outline-offset: 5px;
  background: color-mix(in srgb, var(--field-bg) 78%, var(--rust) 22%);
}
.share-status { color: var(--olive); font-size: 12px; margin-top: 10px; word-break: break-all; }
.share-status a { color: var(--bluegray); }
.status-banner {
  position: fixed;
  left: 50%;
  top: 86px;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(520px, calc(100vw - 32px));
  background: color-mix(in srgb, var(--paper) 96%, white 4%);
  color: var(--ink);
  border: 2px solid var(--olive);
  border-radius: var(--control-radius);
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}
.status-banner.error { background: #fee2e2; color: #991b1b; border-color: #ef4444; }
.status-banner.success { background: color-mix(in srgb, var(--field-bg) 62%, var(--olive) 38%); border-color: var(--olive); }
.status-banner.warn { background: #fff7ed; color: #9a3412; border-color: #f97316; }
.shared-card { background: var(--paper); border: 1px solid var(--card-border); border-radius: var(--card-radius); padding: 24px;
               box-shadow: 0 10px 28px var(--shadow); margin-bottom: 16px; display: none; }
.profile-card { display: none; width: min(940px, 100%); max-width: 100%; margin: 0 auto 18px; }
.profile-card.active { display: block; }
.profile-sticky-actions {
  position: fixed;
  top: var(--profile-actions-top, 86px);
  left: var(--profile-actions-left, 50%);
  z-index: 49;
  width: var(--profile-actions-width, min(940px, calc(100vw - 32px)));
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--paper) 94%, var(--field-bg) 6%);
  box-shadow: 0 10px 24px rgba(43,38,30,0.10);
}
.profile-sticky-actions .btn-primary,
.profile-sticky-actions .btn-clear { min-height: 40px; }
.profile-card.active .profile-sticky-actions + .profile-settings-card {
  margin-top: var(--profile-actions-space, 64px);
}
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; max-width: 100%; }
.profile-grid input, .profile-grid select, .profile-grid textarea {
  border: 1px solid var(--card-border); border-radius: var(--control-radius); padding: 10px 12px;
  font-size: 13px; outline: none; font-family: inherit; background: var(--field-bg); color: var(--ink);
  width: 100%;
  min-width: 0;
}
.profile-grid textarea { min-height: 74px; resize: vertical; }
.profile-full { grid-column: 1 / -1; }
.profile-field { display: grid; gap: 5px; min-width: 0; }
.profile-field.profile-full { grid-column: 1 / -1; }
.profile-field-label { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .02em; }
.profile-avatar-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.5);
  padding: 12px;
  min-width: 0;
  max-width: 100%;
}
.profile-avatar-preview {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  border: 2px solid var(--card-border);
  background: var(--field-bg);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 900;
  overflow: hidden;
  flex: 0 0 auto;
}
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-copy { display: grid; gap: 7px; min-width: 0; }
.profile-avatar-file { display: none; }
.profile-avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-social-panel,
.profile-activity-panel {
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.46);
  padding: 12px;
  display: grid;
  gap: 10px;
  min-width: 0;
}
.profile-activity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.profile-activity-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,0.46);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.profile-activity-option input {
  width: auto;
  min-width: 16px;
  padding: 0;
  accent-color: var(--olive);
}
.profile-activity-icon { font-size: 16px; line-height: 1; }
.profile-social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.profile-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  align-items: center;
}
.profile-social-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: var(--field-bg);
  color: var(--olive);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
.profile-social-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.info-card { max-width: 940px; margin: 0 auto 18px; }
.info-list { display: grid; gap: 10px; }
.info-item {
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.58);
  padding: 12px;
  display: grid;
  gap: 8px;
}
.info-item.unread { border-color: var(--olive); box-shadow: inset 4px 0 0 var(--olive); }
.info-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.info-title { color: var(--ink); font-size: 15px; font-weight: 900; line-height: 1.35; }
.info-body { color: var(--ink); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.info-meta { color: var(--muted); font-size: 11px; font-weight: 800; }
.info-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.info-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(89,109,78,0.25);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--olive);
  background: rgba(255,255,255,0.45);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.info-badge.warn { color: #9a3412; border-color: rgba(249,115,22,0.34); background: #fff7ed; }
.info-badge.translation { color: #315c74; border-color: rgba(49,92,116,0.28); background: rgba(238,247,250,0.82); }
.info-badge.translation.missing { color: var(--muted); border-color: rgba(120,113,108,0.24); background: rgba(255,255,255,0.36); }
.info-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.info-admin-panel {
  display: none;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.5);
  padding: 12px;
  margin-bottom: 14px;
}
.info-admin-panel.active { display: grid; gap: 10px; }
.info-admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 884;
  display: none;
  background: rgba(22, 25, 19, 0.58);
  backdrop-filter: blur(7px);
  animation: diaryBackdropIn 260ms ease-out;
}
body.info-admin-editing .info-admin-modal-backdrop { display: block; }
body.info-admin-editing .info-admin-panel.active {
  position: fixed;
  z-index: 886;
  left: 50%;
  top: 50%;
  width: min(720px, calc(100vw - 28px));
  max-height: min(86vh, 760px);
  overflow: auto;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 18px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    color-mix(in srgb, var(--paper) 94%, white 6%);
  background-size: 100% 28px;
  box-shadow: 0 28px 92px rgba(18, 22, 16, 0.34);
  animation: diaryMemoryOpen 360ms cubic-bezier(.16, 1, .3, 1);
}
body.info-admin-editing {
  overflow: hidden;
}
.info-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px 130px; gap: 8px; }
.info-admin-grid input, .info-admin-grid select, .info-admin-panel textarea {
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 9px 10px;
  background: var(--field-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
}
.info-admin-panel textarea { min-height: 86px; resize: vertical; }
.info-admin-translation-box {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--card-border);
  border-radius: var(--control-radius);
  padding: 10px;
  background: rgba(255,255,255,0.34);
}
.info-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.official-social-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.5);
  padding: 12px;
  margin: 12px 0 14px;
}
.official-social-link { white-space: nowrap; }
.comment-notification-list { margin: 12px 0; }
.comment-notification-item.unread { border-color: var(--olive); box-shadow: inset 4px 0 0 var(--olive); }
.public-engagement {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.engagement-comment-btn {
  cursor: pointer;
  font-family: inherit;
}
.engagement-comment-btn:hover {
  background: var(--control-hover);
  color: var(--ink);
}
.engagement-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--muted);
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.engagement-btn:hover { background: var(--control-hover); color: var(--ink); }
.engagement-btn.active {
  background: color-mix(in srgb, var(--olive) 18%, var(--control-bg));
  border-color: var(--olive);
  color: var(--olive);
}
.engagement-btn .plb-icon,
.engagement-summary-chip .plb-icon {
  width: 1.55em;
  height: 1.55em;
}
.public-engagement .engagement-label,
.public-engagement .engagement-btn span:first-of-type:not(.engagement-count),
.public-engagement .engagement-summary-chip span:first-of-type:not(.engagement-count) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.engagement-count {
  min-width: 1.2em;
  text-align: center;
  font-size: 13px;
  line-height: 1;
}
.public-comments { display: grid; gap: 10px; }
.public-comments-more { justify-self: start; }
.public-comment-list { display: grid; gap: 10px; }
.public-comment {
  position: relative;
  border-bottom: 1px solid rgba(158,139,96,0.18);
  background: transparent;
  padding: 10px 4px 10px 0;
}
.public-comment.is-reply {
  margin-left: 18px;
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--card-border) 76%, var(--olive) 24%);
}
.public-comment.public-comment-highlight {
  border-color: var(--olive);
  background: color-mix(in srgb, var(--olive) 12%, var(--card-bg));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--olive) 18%, transparent);
}
.public-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.public-comment-author {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.public-comment-author strong,
.public-comment-head strong { color: var(--ink); font-size: 12px; }
.public-comment-menu {
  position: relative;
  flex: 0 0 auto;
}
.public-comment-menu summary {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}
.public-comment-menu summary::-webkit-details-marker { display: none; }
.public-comment-menu summary:hover {
  background: var(--control-bg);
  color: var(--ink);
}
.public-comment-menu-body {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  display: grid;
  gap: 6px;
  min-width: 116px;
  padding: 8px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(93,79,56,0.22);
}
.public-comment-menu.floating .public-comment-menu-body {
  position: fixed;
  right: auto;
  top: auto;
  z-index: 12000;
  width: max-content;
  max-width: calc(100vw - 24px);
}
.public-comment-menu-body .btn-mini {
  width: 100%;
  justify-content: center;
  min-height: 38px;
  font-size: 14px;
  line-height: 1.35;
  padding: 8px 12px;
}
.public-comment-menu-body .danger {
  color: #9a3412;
}
.public-comment-body {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  margin-top: 6px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.public-comment-body.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.public-comment-more {
  border: none;
  background: transparent;
  color: var(--bluegray);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 0 0;
}
.public-comment-like,
.public-comment-reply {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 0 0;
}
.public-comment-like .plb-icon {
  width: 1.25em;
  height: 1.25em;
}
.public-comment-like.active,
.public-comment-like:hover,
.public-comment-reply:hover {
  color: var(--olive);
}
.public-comment-replies {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}
.public-comment-replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--olive) 28%, var(--card-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--field-bg) 78%, var(--olive) 10%);
  color: var(--muted);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}
.public-comment-replying button {
  border: none;
  background: transparent;
  color: var(--olive);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.public-comment-actions,
.public-comment-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.public-comment-form { display: grid; gap: 7px; }
.public-comment-form textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--control-bg);
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.public-comment-form-actions { justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 800; }
.follow-btn.active {
  background: color-mix(in srgb, var(--olive) 20%, var(--control-bg));
  border-color: var(--olive);
  color: var(--olive);
}
.author-follow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.public-author-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
.public-author-trigger span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.public-author-trigger:not(:disabled):hover span:last-child {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.public-author-trigger.detail {
  gap: 10px;
}
.public-author-avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--olive) 28%, var(--card-border));
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--olive) 18%, var(--paper));
  color: var(--olive);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.public-author-avatar.small {
  width: 24px;
  height: 24px;
  font-size: 10px;
}
.public-author-avatar.large {
  width: 38px;
  height: 38px;
  font-size: 14px;
}
.public-author-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-follow-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.profile-follow-user > div {
  min-width: 0;
}
.public-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: rgba(15, 18, 16, 0.46);
}
.public-profile-modal {
  position: fixed;
  left: 50%;
  top: clamp(82px, 12vh, 130px);
  z-index: 9601;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - clamp(82px, 12vh, 130px) - 24px);
  overflow-y: auto;
  transform: translateX(-50%);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 18px 60px rgba(0,0,0,0.28);
}
.public-profile-backdrop[hidden],
.public-profile-modal[hidden] {
  display: none;
}
.public-profile-card {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.public-profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.public-profile-body {
  display: grid;
  gap: 10px;
}
.public-profile-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: 10px;
  background: color-mix(in srgb, var(--field-bg) 82%, var(--paper));
}
.public-profile-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.public-profile-row strong {
  color: var(--ink);
  font-size: 14px;
}
.public-profile-bio {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.public-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.public-profile-shared-links {
  display: grid;
  gap: 7px;
}
button.profile-social-link {
  cursor: pointer;
  font: inherit;
}
.public-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
body.public-profile-open {
  overflow: hidden;
}
.engagement-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: 999px;
  background: rgba(255,250,238,0.44);
  color: var(--muted);
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 900;
}
.pack-cloud-info .public-engagement {
  flex-wrap: nowrap;
  gap: 5px;
}
.pack-cloud-info .pack-cloud-engagement {
  min-height: 24px;
}
.pack-cloud-info .pack-cloud-engagement[aria-hidden="true"] {
  pointer-events: none;
}
.pack-cloud-info .engagement-summary-chip {
  min-height: 22px;
  padding: 2px 6px;
  font-size: 10px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .pack-cloud-info .pack-cloud-engagement {
    display: none;
  }

  .packs-workspace,
  .pack-library-panel,
  .pack-library-drawer,
  .pack-library-drawer[open],
  #cloud-pack-list.pack-library-list {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #cloud-pack-list.pack-library-list {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: auto;
    overscroll-behavior: auto;
    touch-action: auto;
  }
}
.account-lifecycle-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.5);
  padding: 10px 12px;
}
.account-lifecycle-title { color: var(--ink); font-size: 13px; font-weight: 900; }
.account-lifecycle-text { color: var(--muted); font-size: 12px; line-height: 1.55; }
.profile-points-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--field-bg) 82%, var(--olive) 18%);
  padding: 12px;
  min-width: 0;
  max-width: 100%;
}
.profile-points-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.profile-rank-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile-rank-badge {
  width: 74px;
  height: 74px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 16px rgba(47,43,36,0.18));
}
.profile-rank-name { color: var(--ink); font-size: 16px; font-weight: 900; }
.profile-rank-caption { color: var(--muted); font-size: 11px; font-weight: 800; margin-top: 2px; }
.profile-rank-points { color: var(--olive); font-size: 14px; font-weight: 900; white-space: nowrap; }
.profile-points-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.profile-point-stat { border: 1px solid rgba(158,139,96,0.22); border-radius: var(--control-radius); background: rgba(255,255,255,0.42); padding: 8px; min-width: 0; }
.profile-point-label { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.profile-point-value { color: var(--ink); font-size: 14px; font-weight: 900; margin-top: 3px; }
.profile-ai-usage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(86,104,82,0.20);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,0.34);
  padding: 9px 10px;
}
.profile-ai-usage-copy { min-width: 0; }
.profile-ai-usage-title { color: var(--ink); font-size: 12px; font-weight: 900; }
.profile-ai-usage-meta { color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 2px; }
.profile-ai-usage-count { color: var(--olive); font-size: 15px; font-weight: 900; white-space: nowrap; }
.profile-rank-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(86,104,82,0.18);
  overflow: hidden;
}
.profile-rank-progress span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--olive);
}
.profile-points-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.profile-badge-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.profile-badge-tile {
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,0.36);
  padding: 8px 6px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}
.profile-badge-tile.current {
  border-color: var(--olive);
  background: color-mix(in srgb, var(--field-bg) 72%, var(--olive) 28%);
  box-shadow: 0 8px 20px rgba(47,43,36,0.10);
}
.profile-badge-tile.locked { opacity: 0.36; filter: grayscale(0.95); }
.profile-badge-tile img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(47,43,36,0.14));
}
.profile-badge-title { color: var(--ink); font-size: 11px; font-weight: 900; line-height: 1.2; }
.profile-badge-meta { color: var(--muted); font-size: 9px; font-weight: 900; line-height: 1.2; }
.profile-special-badges {
  grid-column: 1 / -1;
  border: 1px solid rgba(184,122,44,0.26);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--field-bg) 86%, #d9a441 14%);
  padding: 10px;
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.profile-special-badges[hidden] { display: none; }
.profile-special-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.profile-special-title { color: var(--ink); font-size: 13px; font-weight: 900; }
.profile-special-meta { color: var(--muted); font-size: 11px; font-weight: 800; }
.profile-special-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-special-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(184,122,44,0.24);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,0.38);
  padding: 9px;
  min-width: 0;
}
.profile-special-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.56);
  color: #7a4d13;
  font-size: 17px;
  font-weight: 900;
}
.profile-special-name { color: var(--ink); font-size: 13px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.profile-special-description { color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.profile-history-panel {
  grid-column: 1 / -1;
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,0.28);
  padding: 10px;
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.profile-history-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.profile-history-list { display: grid; gap: 7px; max-height: 260px; overflow: auto; }
.profile-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(158,139,96,0.18);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.46);
  padding: 8px 9px;
}
.profile-history-title { color: var(--ink); font-size: 13px; font-weight: 900; overflow-wrap: anywhere; }
.profile-history-meta { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.profile-history-points { color: var(--olive); font-size: 13px; font-weight: 900; white-space: nowrap; }
.profile-history-points.inactive { color: var(--muted); text-decoration: line-through; }
.profile-reaction-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.profile-reaction-tab {
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.profile-reaction-tab.active {
  background: color-mix(in srgb, var(--olive) 18%, var(--control-bg));
  color: var(--olive);
  border-color: var(--olive);
}
.account-security-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  border-left: 3px solid var(--olive);
  padding-left: 10px;
}
.admin-review-panel {
  display: none;
  grid-column: 1 / -1;
  border: 1px solid rgba(80,108,120,0.22);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,0.36);
  padding: 10px;
}
.admin-review-panel.active { display: grid; gap: 10px; }
.admin-review-panel[hidden] { display: none !important; }
.admin-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.22fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.admin-section-nav {
  position: sticky;
  top: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--paper) 92%, white 8%);
  padding: 10px;
}
.admin-section-nav button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--bluegray);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  padding: 8px 10px;
}
.admin-section-badge {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #b4573f;
  color: #fffaf0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 0 6px;
}
.admin-section-badge[hidden] {
  display: none;
}
.admin-section-nav button.active {
  border-color: rgba(94,113,73,0.28);
  background: rgba(94,113,73,0.12);
  color: var(--olive);
}
.admin-section-panels {
  min-width: 0;
}
.admin-review-toolbar { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.admin-dashboard-card {
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,0.44);
  padding: 10px;
  min-width: 0;
}
.admin-dashboard-label { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.admin-dashboard-value { color: var(--ink); font-size: 20px; font-weight: 900; margin-top: 4px; }
.admin-review-list { display: grid; gap: 8px; max-height: 420px; min-width: 0; overflow: auto; }
.admin-review-card { display: grid; gap: 8px; min-width: 0; border: 1px solid rgba(158,139,96,0.24); border-radius: var(--control-radius); background: rgba(255,250,238,0.58); padding: 10px; }
.admin-review-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.admin-review-title { color: var(--ink); font-size: 14px; font-weight: 900; }
.admin-review-meta { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.45; }
.admin-user-filterbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 7px;
  align-items: center;
  margin: 10px 0 8px;
  min-width: 0;
}
.admin-user-filterbar input[type="search"] {
  grid-column: span 2;
}
.admin-user-filterbar input,
.admin-user-filterbar select,
.admin-user-controls select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: var(--field-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: none;
  padding: 8px 9px;
}
.admin-user-filterbar button {
  white-space: nowrap;
}
.admin-user-activity-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 9px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}
.admin-user-presence {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid rgba(97,111,93,0.18);
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(97,111,93,0.08);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.admin-user-presence.online {
  border-color: rgba(55,126,80,0.28);
  background: rgba(55,126,80,0.14);
  color: #2f7448;
}
.admin-user-presence.recent {
  border-color: rgba(184,126,32,0.28);
  background: rgba(184,126,32,0.14);
  color: #8a5b16;
}
.admin-user-presence.offline {
  border-color: rgba(92,98,101,0.22);
  background: rgba(92,98,101,0.10);
  color: #5c6265;
}
.admin-user-presence.unknown {
  border-color: rgba(120,109,86,0.16);
  background: rgba(120,109,86,0.08);
  color: #786d56;
}
.admin-change-grid { display: grid; gap: 5px; }
.admin-change-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; color: var(--bluegray); font-size: 12px; font-weight: 800; }
.admin-review-controls { display: grid; grid-template-columns: minmax(70px, 0.18fr) minmax(0, 1fr) auto auto auto auto; gap: 7px; align-items: center; }
.admin-review-controls input, .admin-review-controls textarea {
  background: var(--field-bg); color: var(--ink); border: 1px solid var(--card-border);
  border-radius: var(--control-radius); padding: 8px 9px; font-family: inherit; font-size: 12px; outline: none;
}
.admin-review-controls textarea { min-height: 38px; resize: vertical; }
.admin-user-controls {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 104px 72px minmax(120px, 1.2fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
}
.admin-user-controls input,
.admin-user-controls select {
  background: var(--field-bg); color: var(--ink); border: 1px solid var(--card-border);
  border-radius: var(--control-radius); padding: 8px 9px; font-family: inherit; font-size: 12px; outline: none;
  min-width: 0;
}
.admin-user-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.admin-user-stat {
  border: 1px solid rgba(158,139,96,0.20);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,0.44);
  padding: 7px;
}
.admin-user-stat-label { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.admin-user-stat-value { color: var(--ink); font-size: 13px; font-weight: 900; margin-top: 2px; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  margin: 20px auto 0;
  padding: 14px 0 2px;
  text-align: center;
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.legal-links a { color: var(--bluegray); font-weight: 800; text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }
.copyright-line,
.launch-line,
.attribution-line {
  width: 100%;
  color: var(--muted);
  line-height: 1.5;
}
.launch-line {
  color: var(--olive);
  font-weight: 900;
  letter-spacing: 0.02em;
}
.attribution-line a { color: var(--bluegray); font-weight: 800; text-decoration: none; }
.attribution-line a:hover { text-decoration: underline; }
.consent-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(38,53,27,0.46);
  padding: 18px;
}
.consent-gate.active { display: flex; }
.consent-card {
  width: min(620px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: 0 22px 70px rgba(0,0,0,0.34);
  padding: 22px;
  display: grid;
  gap: 14px;
}
.consent-card h2 { color: var(--ink); font-size: 20px; margin: 0; }
.consent-card p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; }
.consent-list {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(158,139,96,0.25);
  border-radius: var(--control-radius);
  background: rgba(255,250,238,0.44);
  padding: 12px;
}
.consent-check { display: flex; align-items: flex-start; gap: 9px; color: var(--ink); font-size: 13px; line-height: 1.55; font-weight: 800; }
.consent-check input { margin-top: 3px; accent-color: var(--olive); }
.consent-check a { color: var(--bluegray); font-weight: 900; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.consent-status { min-height: 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.shared-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.shared-meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.shared-note { color: var(--ink); font-size: 13px; line-height: 1.6; margin-bottom: 14px; white-space: pre-wrap; }
.empty-pack { color: var(--muted); font-size: 14px; text-align: center; padding: 16px 0; }
.error-msg { background: #fee2e2; color: #991b1b; border-radius: 10px;
             padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.notice-msg { background: #fff7ed; color: #9a3412; border-radius: 10px;
              padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.toast-center {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: color-mix(in srgb, var(--paper) 94%, white 6%);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: 0 18px 50px rgba(0,0,0,0.24);
  padding: 16px 22px;
  max-width: min(420px, calc(100vw - 40px));
  text-align: center;
  font-weight: 800;
  pointer-events: none;
}
.toast-center.point-toast {
  min-width: min(340px, calc(100vw - 40px));
  padding: 18px 22px;
  border-width: 2px;
}
.toast-center.guide-toast {
  display: grid;
  gap: 4px;
  min-width: min(320px, calc(100vw - 40px));
  text-align: left;
}
.guide-toast-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.guide-toast-body {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}
.point-toast.positive {
  background: color-mix(in srgb, var(--olive-soft) 86%, white 14%);
  border-color: color-mix(in srgb, var(--olive) 68%, white 32%);
}
.point-toast.negative {
  background: color-mix(in srgb, #fee2e2 82%, white 18%);
  border-color: #b45309;
}
.point-toast-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.point-toast-main { display: block; font-size: 22px; color: var(--olive); letter-spacing: 0.03em; }
.point-toast.negative .point-toast-main { color: #9a3412; }
.field-card { background:
                linear-gradient(var(--line) 1px, transparent 1px),
                var(--paper);
              background-size: 100% 28px;
              border: 1px solid var(--card-border); border-radius: var(--card-radius); padding: 24px;
              box-shadow: 0 10px 28px var(--shadow); margin-bottom: 16px; }
.field-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.field-head h2 { font-size: 18px; margin-bottom: 0; }
.field-log-form { display: none; }
.field-log-form.active { display: block; }
.field-log-form.modal-edit,
.diary-compose.modal-edit,
#result-area.gear-editor-modal {
  position: fixed;
  inset: 18px;
  z-index: 9000;
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  margin: auto;
  overflow: auto;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--paper);
  padding: 18px;
  box-shadow:
    0 0 0 100vmax rgba(15, 18, 16, 0.48),
    0 24px 70px rgba(0,0,0,0.30);
}
.field-log-form.modal-edit.active { display: block; }
.diary-compose.modal-edit {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
}
.diary-compose-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.diary-compose-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.diary-compose-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}
.diary-compose-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0;
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}
#result-area.gear-editor-modal {
  display: block;
  background:
    linear-gradient(90deg, rgba(93,79,56,0.045) 1px, transparent 1px),
    linear-gradient(rgba(93,79,56,0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
}
#result-area.gear-editor-modal:empty {
  display: none;
  box-shadow: none;
}
#result-area.gear-editor-modal .gear-card {
  margin: 0;
  box-shadow: none;
}
.field-log-viewer { display: none; margin: 12px 0 16px; border: 1px solid rgba(158,139,96,0.30);
                    border-radius: var(--card-radius); background: var(--card-fill); overflow: hidden; }
.field-log-viewer.active { display: block; }
.field-log-viewer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
                         padding: 14px; border-bottom: 1px solid rgba(93,79,56,0.14); }
.field-log-viewer-title { color: var(--ink); font-size: 20px; font-weight: 900; line-height: 1.25; }
.field-log-viewer-meta { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 4px; }
.field-log-viewer-body { display: grid; gap: 12px; padding: 14px; }
.field-log-viewer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.field-log-viewer-section { border-top: 1px solid rgba(93,79,56,0.14); padding-top: 12px; }
.field-log-viewer-section:first-child { border-top: none; padding-top: 0; }
.field-log-viewer-label { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.field-log-viewer-value { color: var(--ink); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
#field-log-viewer .local-memory-dialog {
  font-family: var(--font-body);
}
#field-log-viewer .diary-memory-title {
  font-family: var(--font-body);
  font-weight: 900;
  letter-spacing: 0;
}
#field-log-viewer .diary-memory-meta {
  font-family: var(--font-body);
  font-weight: 800;
}
#field-log-viewer .field-log-viewer-label {
  font-family: var(--font-body);
  font-size: 11px;
}
#field-log-viewer .field-log-viewer-value,
#field-log-viewer .field-log-photo-caption {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.75;
  letter-spacing: 0;
}
.field-log-viewer-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 0 12px;
  margin-bottom: 2px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--paper) 96%, white 4%) 0%,
    color-mix(in srgb, var(--paper) 96%, white 4%) 76%,
    transparent 100%
  );
}
.field-log-viewer-actions .btn-mini {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 900;
  border-radius: var(--control-radius);
}
.field-photo-uploader {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border: 1px dashed color-mix(in srgb, var(--olive) 42%, var(--card-border));
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--field-bg) 88%, var(--olive) 12%);
  padding: 12px;
}
.field-photo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.field-photo-title { color: var(--ink); font-size: 13px; font-weight: 900; }
.field-photo-note { color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 800; }
.field-photo-input { display: none; }
.field-photo-status { color: var(--olive); font-size: 12px; font-weight: 800; min-height: 16px; }
.field-photo-preview-home {
  max-height: 178px;
  overflow: hidden;
}
.field-photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}
.field-photo-preview-home .field-photo-preview {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}
.field-photo-preview-home .field-photo-card {
  gap: 6px;
  padding: 6px;
}
.field-photo-preview-home .field-photo-reorder-actions,
.field-photo-preview-home .field-photo-caption,
.field-photo-preview-home .field-photo-remove {
  display: none;
}
.field-photo-card {
  border: 1px solid rgba(158,139,96,0.28);
  border-radius: var(--card-radius);
  background: rgba(255,255,255,0.28);
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 8px;
  cursor: grab;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.field-photo-card.dragging {
  opacity: 0.68;
  transform: scale(0.985);
  box-shadow: 0 12px 28px rgba(46, 52, 36, 0.18);
}
.field-photo-card.drag-over {
  border-color: var(--olive);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--olive) 35%, transparent);
}
.field-photo-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.field-photo-reorder-actions {
  display: inline-flex;
  gap: 4px;
}
.field-photo-reorder-actions .btn-mini {
  min-height: 28px;
  padding: 4px 8px;
}
.field-photo-thumb-wrap {
  position: relative;
}
.field-photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--card-radius) - 3px);
  border: 1px solid var(--card-border);
  background: var(--field-bg);
}
.field-photo-zoom {
  position: absolute;
  right: 7px;
  top: 7px;
  min-height: 28px;
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 999px;
  background: rgba(255,250,238,0.92);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 9px;
  cursor: zoom-in;
  box-shadow: 0 6px 16px rgba(32, 36, 26, 0.16);
}
.field-photo-caption {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: var(--field-bg);
  color: var(--ink);
  padding: 7px 8px;
  font-family: inherit;
  font-size: 12px;
  resize: vertical;
}
.field-photo-remove { width: 100%; }
.field-photo-manager[hidden] { display: none; }
.field-photo-manager {
  position: fixed;
  inset: 24px;
  z-index: 2200;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  max-width: 1480px;
  margin: auto;
  border: 1px solid rgba(158,139,96,0.34);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--card-fill) 94%, white 6%);
  box-shadow: 0 28px 90px rgba(32, 36, 26, 0.32);
  padding: 16px;
}
.field-photo-manager::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(32, 36, 26, 0.46);
  backdrop-filter: blur(2px);
}
.field-photo-manager-head,
.field-photo-manager-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.field-photo-manager-body {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.field-photo-manager-body .field-photo-preview {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
}
body.field-photo-manager-open {
  overflow: hidden;
}
.field-log-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.field-log-photo-frame {
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--field-bg) 88%, white 12%);
  padding: 8px;
}
.field-log-photo-frame img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: calc(var(--card-radius) - 3px);
  background: rgba(0,0,0,0.06);
  cursor: zoom-in;
}
.field-log-photo-caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  margin-top: 6px;
  white-space: pre-wrap;
}
.field-log-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24, 26, 22, 0.72);
}
.field-log-photo-lightbox img {
  max-width: min(96vw, 1280px);
  max-height: min(92vh, 960px);
  object-fit: contain;
  border-radius: var(--card-radius);
  background: rgba(0,0,0,0.12);
  box-shadow: 0 24px 70px rgba(0,0,0,0.42);
  cursor: zoom-out;
}
.field-log-photo-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.plb-confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 26, 22, 0.62);
  backdrop-filter: blur(8px);
}
.plb-confirm-card {
  width: min(92vw, 460px);
  max-height: min(82vh, 620px);
  overflow: auto;
  border: 1px solid rgba(158,139,96,0.34);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--card-fill) 94%, white 6%);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(32,36,26,0.32);
  padding: 18px;
}
.plb-confirm-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.plb-confirm-card h2 {
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 10px;
}
.plb-confirm-body {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
  white-space: normal;
}
.plb-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.plb-confirm-actions .btn-primary,
.plb-confirm-actions .btn-clear {
  width: 100%;
  min-height: 42px;
}
.plb-confirm-actions .btn-primary.danger {
  background: #8f3f2d;
  border-color: #8f3f2d;
  color: #fffaf0;
}

.external-link-panel { border: 1px dashed rgba(93,79,56,0.22); border-radius: 8px; background: rgba(255,251,239,0.72); padding: 10px; }
.external-link-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.external-link-title { font-size: 12px; font-weight: 900; color: var(--ink); }
.external-link-note { font-size: 11px; color: var(--muted); line-height: 1.5; }
.external-link-list { display: grid; gap: 8px; }
.external-link-row { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(140px, 1fr) auto; gap: 8px; align-items: center; }
.external-link-row .btn-mini { min-width: 34px; min-height: 34px; padding: 4px 8px; }
.external-link-actions { gap: 6px; }
.external-link-viewer .btn-mini { max-width: 100%; overflow-wrap: anywhere; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-grid > * { min-width: 0; max-width: 100%; }
.field-grid input, .field-grid select, .field-grid textarea {
  width: 100%;
  border: 1px solid var(--card-border); border-radius: var(--control-radius); padding: 10px 12px;
  font-size: 13px; outline: none; font-family: inherit; background: var(--field-bg);
  color: var(--ink);
}
.field-grid textarea { min-height: 76px; resize: vertical; }
.field-log-sticky-actions {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(160px, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--paper) 94%, var(--field-bg) 6%);
  box-shadow: 0 10px 24px rgba(43,38,30,0.10);
}
.field-log-sticky-actions .btn-clear,
.field-log-sticky-actions .btn-primary { min-height: 40px; }
.field-log-form-section {
  grid-column: 1 / -1;
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--field-bg) 86%, var(--paper) 14%);
  overflow: hidden;
}
.field-log-form-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
}
.field-log-form-section summary::-webkit-details-marker { display: none; }
.field-log-form-section summary strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.3;
}
.field-log-form-section summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.field-log-section-caret {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(158,139,96,0.28);
  border-radius: 999px;
  background: var(--field-bg);
  color: var(--olive);
  font-weight: 900;
  transition: transform .16s ease;
}
.field-log-form-section[open] .field-log-section-caret { transform: rotate(180deg); }
.field-log-form-subsection {
  margin-top: 2px;
  background: color-mix(in srgb, var(--paper) 52%, var(--field-bg) 48%);
}
.field-log-form-subsection summary {
  min-height: 48px;
  padding: 10px 12px;
}
.field-log-section-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}
.field-log-section-body > * { min-width: 0; }
.field-log-section-body .field-photo-uploader,
.field-log-section-body .field-location-box,
.field-log-section-body .field-db-picker,
.field-log-section-body .gpx-importer,
.field-log-section-body .external-link-panel,
.field-log-section-body .field-public-control,
.field-log-section-body textarea,
.field-log-section-body .field-full {
  grid-column: 1 / -1;
}
.field-full { grid-column: 1 / -1; }
.time-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; }
.route-db-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.route-db-status { color: var(--muted); font-size: 12px; }
.field-section-title { grid-column: 1 / -1; color: var(--muted); font-size: 12px;
                       font-weight: 800; margin-top: 6px; }
.field-location-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(158,139,96,0.26);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--field-bg) 86%, var(--olive) 14%);
  padding: 12px;
}
.field-location-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}
.field-location-actions .btn-clear,
.field-location-actions .btn-primary {
  width: 100%;
  min-height: 38px;
}
.field-location-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}
.field-map-picker {
  display: grid;
  grid-template-rows: auto auto auto minmax(280px, 1fr) auto auto;
  gap: 10px;
  position: fixed;
  inset: clamp(14px, 4vh, 44px) clamp(12px, 5vw, 72px);
  z-index: 9400;
  border: 1px solid rgba(158,139,96,0.30);
  border-radius: var(--card-radius);
  background: var(--field-bg);
  padding: 14px;
  box-shadow: 0 24px 70px rgba(43,38,30,0.26);
}
.field-map-picker::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(35, 30, 22, 0.32);
}
.field-map-picker[hidden] { display: none; }
.field-map-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.field-map-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.field-map-search > * { min-width: 0; }
.field-location-candidates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  max-height: min(26vh, 220px);
  overflow-y: auto;
  padding: 2px;
  overscroll-behavior: contain;
}
.field-location-candidates[hidden] { display: none; }
.field-location-candidate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 8px;
  border: 1px solid rgba(158,139,96,0.32);
  border-radius: 8px;
  background: rgba(255, 251, 238, 0.82);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.field-location-candidate:hover {
  border-color: rgba(166, 82, 36, 0.58);
  background: rgba(255, 247, 225, 0.96);
}
.field-location-candidate-index,
.field-location-candidate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(79, 107, 59, 0.12);
  color: var(--olive);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.field-location-candidate-badge {
  min-width: auto;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(166, 82, 36, 0.12);
  color: var(--accent);
}
.field-location-candidate-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.field-location-candidate-main strong,
.field-location-candidate-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field-location-candidate-main strong {
  font-size: 13px;
  font-weight: 900;
}
.field-location-candidate-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.field-location-candidate-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid #fffaf0;
  border-radius: 999px;
  background: var(--accent);
  color: #fffaf0;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(43, 38, 30, 0.28);
  cursor: pointer;
}
.field-location-candidate-marker.source-mountain_db { background: #356436; }
.field-location-candidate-marker.source-campground_db { background: #8a6232; }
.field-location-candidate-marker.source-heartrails_express { background: #2f6f8f; }
.field-location-candidate-marker.source-heartrails_geo { background: #a65224; }
.field-location-candidate-marker.source-gsi_address { background: #6b6a57; }
.field-location-candidate-marker.source-osm_place { background: #4f6b3b; }
.field-map-shell {
  position: relative;
  height: auto;
  min-height: min(62vh, 620px);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: #d8dfce;
}
#field-location-map { position: absolute; inset: 0; }
.field-map-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}
.field-map-basemap-status {
  margin-top: -2px;
  color: var(--olive);
  font-size: 11px;
}
#field-memo {
  min-height: 15em;
  line-height: 1.55;
}
.field-db-picker {
  position: fixed;
  inset: 0;
  z-index: 1280;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(28, 31, 24, 0.42);
  backdrop-filter: blur(8px);
}
.field-db-picker[hidden] { display: none; }
.field-db-picker-card {
  width: min(720px, calc(100vw - 28px));
  max-height: min(78vh, 720px);
  overflow: auto;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(158,139,96,0.38);
  border-radius: var(--card-radius);
  background: var(--card-fill);
  color: var(--ink);
  padding: 16px;
  box-shadow: 0 24px 70px rgba(28, 31, 24, 0.32);
}
.field-db-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.field-db-picker-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}
.field-db-picker-copy {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}
.field-db-picker-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.gpx-importer {
  grid-column: 1 / -1;
  border: 1px dashed color-mix(in srgb, var(--olive) 48%, var(--card-border));
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--field-bg) 82%, var(--olive) 18%);
  padding: 14px;
  display: grid;
  gap: 10px;
}
.gpx-importer.dragging {
  border-color: var(--rust);
  background: color-mix(in srgb, var(--field-bg) 72%, var(--rust) 28%);
}
.gpx-import-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.gpx-import-title { font-size: 13px; font-weight: 800; color: var(--ink); }
.gpx-import-text { font-size: 12px; color: var(--muted); line-height: 1.5; }
.gpx-import-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gpx-file-input { display: none; }
.gpx-import-status { font-size: 12px; color: var(--olive); }
.field-status { color: var(--olive); font-size: 13px; margin-top: 12px; }
.field-card .cloud-item { background: var(--card-fill); border-color: rgba(158,139,96,0.28); }
.field-card .cloud-item-title { color: var(--ink); }
.field-card .cloud-item-meta { color: var(--muted); }
.field-card .btn-mini { background: var(--control-bg); color: var(--ink); border-color: var(--card-border); }
.field-card .btn-mini:hover { background: var(--control-hover); }
.diary-launch-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(158,139,96,0.26);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--card-fill) 88%, var(--olive) 8%);
  padding: 14px;
  margin: 12px 0 16px;
}
.diary-launch-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}
.diary-launch-button { min-height: 42px; white-space: nowrap; }
.diary-compose {
  display: none;
  gap: 9px;
  border: 1px solid rgba(158,139,96,0.30);
  border-radius: var(--card-radius);
  background: var(--card-fill);
  padding: 14px;
  margin: 12px 0 16px;
}
.diary-fab {
  position: fixed;
  right: clamp(20px, 3vw, 42px);
  top: clamp(150px, 18vh, 220px);
  z-index: 850;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--olive) 64%, var(--card-border));
  background: var(--olive);
  color: #fffdf4;
  box-shadow: 0 16px 34px rgba(36, 50, 28, 0.28);
  cursor: pointer;
  font-size: 25px;
  font-weight: 900;
  transform: rotate(18deg);
}
.diary-fab:hover { background: var(--forest); transform: rotate(18deg) translateY(-1px); }
@media (max-width: 1024px) {
  .diary-fab {
    top: auto;
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    transform: none;
  }
  .diary-fab:hover { transform: none; }
}
.diary-compose textarea,
.diary-compose input,
.diary-compose select {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  background: var(--field-bg);
  color: var(--ink);
}
.diary-compose textarea { min-height: 188px; resize: vertical; line-height: 1.58; font-size: 15px; }
.diary-time-row {
  display: grid;
  grid-template-columns: minmax(210px, 280px) auto minmax(300px, 1fr);
  gap: 8px 16px;
  align-items: end;
}
.diary-time-row .btn-clear { min-height: 38px; }
.diary-compose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diary-compose-grid > * { min-width: 0; }
.diary-advanced-settings .diary-compose-grid {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.diary-field-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.checkbox-row { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 800; }
.checkbox-row input { width: auto; min-width: 18px; height: 18px; }
.diary-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(158,139,96,0.22);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--field-bg) 86%, var(--olive) 9%);
  padding: 8px 10px;
}
.diary-share-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}
.diary-share-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.diary-share-switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
  border: 1px solid rgba(93,79,56,0.26);
  border-radius: 999px;
  background: var(--control-bg);
  transition: background 160ms ease, border-color 160ms ease;
}
.diary-share-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}
.diary-share-toggle input:checked + .diary-share-switch {
  border-color: color-mix(in srgb, var(--olive) 60%, var(--card-border));
  background: color-mix(in srgb, var(--olive) 84%, var(--field-bg) 16%);
}
.diary-share-toggle input:checked + .diary-share-switch::after {
  transform: translateX(20px);
  background: #fffdf4;
}
.diary-share-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--ink);
  line-height: 1.35;
}
.diary-share-copy strong { font-size: 13px; }
.diary-share-copy small { color: var(--muted); font-size: 11px; font-weight: 800; }
.diary-public-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr);
  gap: 8px;
  align-items: center;
}
.diary-public-options[hidden] { display: none; }
.diary-location-share-options {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.diary-location-share-options label {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  cursor: pointer;
}
.diary-location-share-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.diary-location-share-options span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.diary-location-share-options input:checked + span {
  border-color: color-mix(in srgb, var(--olive) 58%, var(--card-border));
  background: color-mix(in srgb, var(--olive) 88%, var(--field-bg) 12%);
  color: #fffdf4;
}
.diary-location-share-options input:disabled + span {
  opacity: 0.58;
  cursor: not-allowed;
}
.diary-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.diary-sticky-actions,
.diary-bottom-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--paper) 94%, var(--field-bg) 6%);
}
.diary-sticky-actions {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 0 12px;
  box-shadow: 0 10px 24px rgba(43,38,30,0.10);
}
.diary-compose.modal-edit .diary-sticky-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  position: sticky;
  top: 0;
  z-index: 20;
  order: -30;
  margin: 0 0 12px;
  background: color-mix(in srgb, var(--paper) 96%, var(--field-bg) 4%);
  backdrop-filter: blur(10px);
}
.diary-compose.modal-edit.is-editing .diary-sticky-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.diary-compose.modal-edit.is-editing .diary-sticky-actions .diary-cancel-button {
  display: none;
}
.diary-compose.modal-edit .diary-compose-head {
  order: -20;
}
.diary-compose.modal-edit .diary-edit-banner {
  order: -10;
}
.diary-compose.modal-edit .diary-bottom-actions {
  display: none;
}
.diary-compose.modal-edit .diary-sticky-actions .diary-cancel-edit-button:not([hidden]),
.diary-compose.modal-edit .diary-sticky-actions .diary-cancel-button,
.diary-compose.modal-edit .diary-sticky-actions .diary-save-action {
  width: 100%;
  min-width: 0;
}
.diary-bottom-actions {
  margin-top: 10px;
}
.diary-sticky-actions .btn-clear,
.diary-sticky-actions .btn-primary,
.diary-bottom-actions .btn-clear,
.diary-bottom-actions .btn-primary {
  min-height: 40px;
}
.diary-sticky-actions .diary-save-action,
.diary-bottom-actions .diary-save-action {
  flex: 1 1 auto;
}
.diary-primary-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.diary-primary-actions .btn-clear,
.diary-primary-actions .btn-primary {
  min-height: 42px;
}
.diary-tool-button {
  width: 42px;
  padding: 0;
  border-radius: 999px;
}
.diary-location-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}
.diary-tool-icon,
.diary-location-icon-btn span[aria-hidden="true"] {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid color-mix(in srgb, var(--olive) 62%, var(--card-border));
  border-radius: 999px;
  color: var(--olive);
  font-size: 18px;
  line-height: 1;
}
.diary-photo-icon,
.diary-target-icon {
  position: relative;
  border-color: color-mix(in srgb, var(--olive) 70%, var(--card-border));
}
.diary-photo-icon::before {
  content: "";
  width: 13px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-sizing: border-box;
}
.diary-photo-icon::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 6px;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}
.diary-target-icon::before,
.diary-target-icon::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid currentColor;
  border-radius: 999px;
}
.diary-target-icon::after {
  inset: auto;
  width: 14px;
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor, 0 -6px 0 -5px currentColor;
}
.diary-tool-label { display: none; }
.diary-location-button {
  justify-self: start;
  min-width: 132px;
  padding-inline: 14px;
  font-weight: 900;
}
.diary-cancel-button { justify-self: end; }
.diary-advanced-settings {
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--field-bg) 90%, var(--paper) 10%);
  padding: 0;
}
.diary-advanced-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: calc(var(--card-radius) - 1px);
  background: color-mix(in srgb, var(--control-bg) 82%, var(--olive) 8%);
  color: var(--forest);
  font-size: 14px;
  font-weight: 900;
}
.diary-advanced-settings summary::-webkit-details-marker { display: none; }
.diary-advanced-settings summary::after {
  content: "⌄";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--olive) 28%, var(--card-border));
  border-radius: 999px;
  background: var(--field-bg);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.diary-advanced-settings[open] summary::after { content: "⌃"; }
.diary-advanced-settings > :not(summary) {
  margin: 0 12px 12px;
}
.diary-edit-banner {
  border: 1px solid rgba(92,116,82,0.22);
  border-radius: var(--card-radius);
  background: rgba(92,116,82,0.08);
  color: var(--forest);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
  padding: 10px 12px;
}
.diary-edit-banner:empty { display: none; }
.diary-location-meta { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.5; }
.diary-selected-place-control input[readonly] {
  color: var(--forest);
  font-weight: 900;
  background: color-mix(in srgb, var(--field-bg) 88%, var(--olive) 8%);
}
.diary-selected-place-control input[readonly]:placeholder-shown {
  color: var(--muted);
  font-weight: 800;
}
.diary-location-dialog {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 18, 16, 0.50);
}
.diary-location-dialog[hidden] { display: none; }
.diary-location-dialog-card {
  width: min(920px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  display: grid;
  gap: 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--paper);
  padding: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.30);
}
.diary-location-dialog input {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  background: var(--field-bg);
  color: var(--ink);
}
.diary-location-choice-grid {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.diary-map-picker {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(158,139,96,0.30);
  border-radius: var(--card-radius);
  background: var(--field-bg);
  padding: 10px;
}
.diary-map-picker[hidden] { display: none; }
.diary-map-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.diary-map-search > * { min-width: 0; }
.diary-location-candidates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  max-height: min(24vh, 210px);
  overflow-y: auto;
  padding: 2px;
  overscroll-behavior: contain;
}
.diary-location-candidates[hidden] { display: none; }
.diary-map-shell {
  position: relative;
  height: min(48vh, 360px);
  min-height: 260px;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: #d8dfce;
}
#diary-location-map { position: absolute; inset: 0; }
.diary-map-hint { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.5; }
.diary-dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.photo-drop-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 112px;
  border: 1px dashed color-mix(in srgb, var(--olive) 38%, var(--card-border));
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--field-bg) 86%, var(--olive) 10%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  padding: 18px;
}
.diary-compose.photo-drop-zone.drag-over .photo-drop-hint {
  border-color: var(--olive);
  background: color-mix(in srgb, var(--field-bg) 76%, var(--olive) 18%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--olive) 26%, transparent);
}
.photo-drop-button {
  min-height: 42px;
  flex: 0 0 auto;
}
.diary-photo-input { display: none; }
.diary-photo-preview-home {
  max-height: 152px;
  overflow: auto;
  border-radius: var(--card-radius);
}
.diary-photo-preview { display: none; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.diary-photo-preview.active { display: grid; }
.diary-photo-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(158,139,96,0.26);
  border-radius: var(--card-radius);
  background: rgba(255,255,255,0.26);
  padding: 7px;
  cursor: grab;
}
.diary-photo-card.dragging {
  opacity: 0.68;
  transform: scale(0.985);
  box-shadow: 0 12px 28px rgba(46, 52, 36, 0.18);
}
.diary-photo-card.drag-over {
  border-color: var(--olive);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--olive) 35%, transparent);
}
.diary-photo-preview-home .diary-photo-preview {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}
.diary-photo-preview-home .diary-photo-card {
  gap: 5px;
  padding: 6px;
}
.diary-photo-preview-home .field-photo-reorder-actions,
.diary-photo-preview-home .diary-photo-caption,
.diary-photo-preview-home .btn-mini {
  display: none;
}
.diary-photo-preview img {
  width: 128px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--field-bg);
  cursor: zoom-in;
}
.diary-photo-exif-meta {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
}
.diary-photo-caption {
  width: 100%;
  min-height: 58px;
  max-height: 86px;
  resize: vertical;
}
.diary-photo-manager-body .diary-photo-preview,
.field-photo-manager-body .diary-photo-preview {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
}
.diary-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.diary-entry-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(158,139,96,0.30);
  border-radius: var(--card-radius);
  background: var(--card-fill);
  padding: 14px;
  cursor: pointer;
}
.diary-entry-card:hover { border-color: rgba(79,107,59,0.5); box-shadow: 0 8px 22px rgba(47,43,36,0.10); }
.diary-entry-card:active { transform: translateY(1px); border-color: rgba(79,107,59,0.55); }
.diary-entry-card:focus-visible { outline: 3px solid rgba(79,107,59,0.35); outline-offset: 2px; }
.diary-entry-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.diary-entry-date { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: 0.04em; }
.diary-entry-body { color: var(--ink); font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.diary-entry-more { color: var(--olive); font-size: 12px; font-weight: 900; }
.diary-entry-photo-wrap {
  position: relative;
}
.diary-entry-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--field-bg);
}
.diary-photo-count-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 34px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.66);
  border-radius: 999px;
  background: rgba(32,36,26,0.76);
  color: #fffaf0;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
}
.diary-memory-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.diary-mobile-meta-stack,
.diary-mobile-body-label {
  display: none;
}
.diary-mobile-actions {
  display: grid;
  grid-template-columns: minmax(126px, 1.35fr) minmax(82px, .9fr) minmax(70px, .75fr) minmax(70px, .75fr);
  gap: 8px;
  align-items: stretch;
  padding-top: 4px;
}
.diary-mobile-actions .btn-mini {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: 100%;
  padding: 8px 10px;
  font-size: .94rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  gap: 2px;
}
.diary-mobile-actions .diary-mobile-icon-action {
  padding-inline: 6px;
}
.diary-mobile-actions .btn-mini small {
  display: block;
  color: inherit;
  font-size: clamp(9px, 2.8vw, 11px);
  font-weight: 900;
  line-height: 1.12;
  max-width: 100%;
}
.diary-mobile-actions .btn-mini:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.diary-mobile-actions .diary-mobile-delete-action {
  color: #8f321f;
  border-color: rgba(143, 50, 31, 0.34);
  background: color-mix(in srgb, var(--control-bg) 84%, #b4573f 16%);
}
.diary-memory-photo-tile {
  position: relative;
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--card-radius);
  background: var(--field-bg);
  padding: 0;
  overflow: hidden;
  margin: 0;
  cursor: zoom-in;
}
.diary-memory-photo-tile.selected-card-photo {
  border-color: rgba(94,113,73,0.86);
  box-shadow: 0 0 0 3px rgba(94,113,73,0.14);
}
.diary-memory-photo-open {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}
.diary-memory-photo-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.diary-memory-card-photo-button {
  position: absolute;
  right: 7px;
  bottom: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(32,36,26,0.72);
  color: #fffaf0;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  cursor: pointer;
}
.diary-memory-photo-tile.selected-card-photo .diary-memory-card-photo-button {
  background: var(--olive);
}
.diary-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
}
.diary-entry-meta { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.55; }
.diary-ai-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.field-log-ai-tools,
#field-log-ai-preview {
  grid-column: 1 / -1;
}
.field-log-ai-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  padding-top: 4px;
}
.field-log-ai-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.field-log-ai-buttons .btn-clear {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}
.field-log-ai-tools .diary-ai-tools-note {
  display: block;
  max-width: 58em;
}
.diary-voice-button {
  border-color: color-mix(in srgb, var(--olive) 32%, var(--card-border));
  background: color-mix(in srgb, var(--control-bg) 84%, var(--olive) 16%);
}
.diary-voice-label-mobile {
  display: none;
}
.diary-ai-tools-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.diary-ai-preview {
  border: 1px solid rgba(158,139,96,0.28);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--field-bg) 88%, var(--olive) 12%);
  padding: 12px;
  display: grid;
  gap: 10px;
}
.diary-ai-preview[hidden] { display: none; }
.diary-ai-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.diary-ai-preview-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}
.diary-ai-preview-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
}
.diary-ai-preview-body {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
  white-space: pre-wrap;
}
.diary-ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.diary-ai-tags span {
  border: 1px solid rgba(94,113,73,0.28);
  border-radius: 999px;
  background: var(--field-bg);
  color: var(--olive);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}
.diary-ai-place {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}
.diary-ai-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.diary-card-actions {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.diary-card-actions .btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: auto;
  max-width: 100%;
  padding: 7px 10px;
  line-height: 1.25;
  white-space: nowrap;
}
.diary-open-button {
  justify-self: stretch;
}
.diary-more-menu {
  position: relative;
  min-width: 82px;
}
.diary-more-menu summary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.diary-more-menu summary::-webkit-details-marker {
  display: none;
}
.diary-more-menu summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 11px;
}
.diary-more-menu[open] summary::after {
  content: "▴";
}
.diary-more-body {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: grid;
  gap: 6px;
  min-width: 174px;
  padding: 9px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(93,79,56,0.22);
}

.diary-more-menu.floating .diary-more-body {
  position: fixed;
  right: auto;
  top: auto;
  bottom: auto;
  z-index: 12000;
  width: max-content;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}
.diary-more-body .btn-mini {
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 40px;
  font-size: 14px;
  line-height: 1.35;
  padding: 8px 12px;
}
.diary-more-body .danger {
  color: #9a3412;
}
.diary-memory-actions .diary-more-menu {
  min-width: 120px;
}
.diary-card-style-select {
  min-height: 34px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: var(--field-bg);
  color: var(--ink);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
}
.diary-entry-card.selected {
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(79,107,59,0.16), 0 10px 24px var(--shadow);
}
.diary-entry-card.opening-viewer {
  transform: translateY(1px) scale(.992);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
#diary-viewer {
  --diary-swipe-progress: 0;
  --diary-swipe-x: 0px;
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: clamp(14px, 3vw, 30px);
  border: 0;
  background: transparent;
  overflow: auto;
}
#diary-viewer.active { display: flex; }
#packing-viewer.memory-viewer,
#public-search-viewer.memory-viewer,
#public-explore-viewer.memory-viewer,
#official-gear-viewer.memory-viewer,
#mountain-viewer.memory-viewer,
#campground-viewer.memory-viewer,
#field-log-viewer.memory-viewer {
  position: fixed;
  inset: 0;
  z-index: 1190;
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: clamp(14px, 3vw, 30px);
  border: 0;
  background: transparent;
  overflow: auto;
}
#packing-viewer.memory-viewer.active,
#public-search-viewer.memory-viewer.active,
#public-explore-viewer.memory-viewer.active,
#official-gear-viewer.memory-viewer.active,
#mountain-viewer.memory-viewer.active,
#campground-viewer.memory-viewer.active,
#field-log-viewer.memory-viewer.active { display: flex; }
.diary-memory-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 28, 22, 0.58);
  backdrop-filter: blur(8px);
  animation: diaryBackdropIn 260ms ease-out;
}
.diary-memory-dialog {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: min(86vh, 980px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(233, 221, 185, 0.72);
  border-radius: calc(var(--card-radius) + 8px);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    color-mix(in srgb, var(--paper) 94%, white 6%);
  background-size: 100% 28px;
  box-shadow: 0 26px 80px rgba(18, 22, 16, 0.34);
  overflow: hidden;
  transform-origin: center center;
  animation: diaryMemoryOpen 360ms cubic-bezier(.16, 1, .3, 1);
  touch-action: pan-y;
  will-change: transform;
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1), opacity 180ms ease;
}
.diary-memory-dialog.is-swiping {
  transition: none;
}
.diary-memory-dialog.photo-zoomed {
  width: min(1080px, 100%);
}
.diary-memory-dialog.photo-zoomed .diary-memory-photo {
  max-height: min(76vh, 820px);
  cursor: zoom-out;
}
.diary-memory-peek {
  position: absolute;
  z-index: 0;
  top: 50%;
  width: min(820px, calc(100% - clamp(28px, 6vw, 60px)));
  max-height: min(86vh, 980px);
  padding: 0;
  border: 1px solid rgba(233, 221, 185, 0.48);
  border-radius: calc(var(--card-radius) + 8px);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    color-mix(in srgb, var(--paper) 84%, white 16%);
  background-size: 100% 28px;
  box-shadow: 0 18px 54px rgba(18, 22, 16, 0.24);
  opacity: 0;
  pointer-events: none;
  filter: saturate(.88);
  transform: translateY(-50%) translateX(var(--peek-rest-x, 0)) scale(.92) rotate(var(--peek-rest-rotate, 0deg));
  transform-origin: center center;
  transition: opacity 160ms ease, transform 180ms cubic-bezier(.2, .8, .2, 1), filter 180ms ease;
  overflow: hidden;
}
.diary-memory-peek.prev {
  left: 50%;
  --peek-rest-x: calc(-50% - 116px);
  --peek-rest-rotate: -4deg;
}
.diary-memory-peek.next {
  right: 50%;
  --peek-rest-x: calc(50% + 116px);
  --peek-rest-rotate: 4deg;
}
#diary-viewer.peek-prev .diary-memory-peek.prev,
#diary-viewer.peek-next .diary-memory-peek.next {
  opacity: calc(.18 + (var(--diary-swipe-progress) * .54));
  filter: saturate(.96);
}
#diary-viewer.peek-prev .diary-memory-peek.prev {
  transform: translateY(-50%) translateX(calc(-50% - 86px + (var(--diary-swipe-progress) * 48px))) scale(calc(.92 + (var(--diary-swipe-progress) * .045))) rotate(calc(-4deg + (var(--diary-swipe-progress) * 2deg)));
}
#diary-viewer.peek-next .diary-memory-peek.next {
  transform: translateY(-50%) translateX(calc(50% + 86px - (var(--diary-swipe-progress) * 48px))) scale(calc(.92 + (var(--diary-swipe-progress) * .045))) rotate(calc(4deg - (var(--diary-swipe-progress) * 2deg)));
}
#diary-viewer.settling-prev .diary-memory-peek.prev,
#diary-viewer.settling-next .diary-memory-peek.next {
  opacity: .78;
}
.diary-memory-peek-inner {
  display: grid;
  gap: 12px;
  max-height: min(86vh, 980px);
  padding: 18px;
  overflow: hidden;
}
.diary-memory-peek-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.diary-memory-peek-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  margin-bottom: 10px;
  background: rgba(255,255,255,.35);
}
.diary-memory-peek-text {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.diary-memory-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(93,79,56,0.14);
}
.diary-memory-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.diary-memory-title {
  color: var(--ink);
  font-family: inherit;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.25;
  margin-top: 4px;
}
.diary-memory-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
  margin-top: 6px;
}
.diary-memory-close {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
}
.diary-memory-body {
  display: grid;
  gap: 14px;
  padding: 18px 18px calc(30px + env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
}
.diary-memory-photo {
  width: 100%;
  max-height: min(52vh, 560px);
  object-fit: contain;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.42);
  cursor: zoom-in;
}
.diary-memory-text {
  color: var(--ink);
  font-family: inherit;
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: 800;
  line-height: 1.78;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.diary-memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.diary-memory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}
.diary-memory-actions > *,
.mountain-actions > *,
.campground-actions > * {
  min-width: 0;
}
.diary-memory-actions .btn-mini,
.mountain-actions .btn-mini,
.campground-actions .btn-mini,
.diary-memory-actions .follow-btn,
.mountain-actions .follow-btn,
.campground-actions .follow-btn {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
}
.diary-memory-actions .diary-more-menu {
  flex: 0 0 auto;
  min-width: 120px;
  max-width: max-content;
}
.diary-memory-actions .diary-more-menu summary {
  width: auto;
  min-width: 120px;
  justify-content: center;
}
.diary-memory-actions .diary-more-body {
  top: calc(100% + 6px);
  bottom: auto;
  right: 0;
  max-width: 100%;
}
.public-memory-dialog { width: min(900px, 100%); }
.local-memory-dialog { width: min(920px, 100%); }
.packing-memory-dialog { width: min(760px, 100%); }
.packing-confirm-list {
  display: grid;
  gap: 8px;
  max-height: min(38vh, 320px);
  overflow: auto;
  padding-right: 2px;
}
.packing-confirm-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--card-fill) 90%, white 10%);
}
.packing-confirm-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.packing-confirm-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-top: 2px;
}
.packing-confirm-weight {
  color: var(--olive);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.public-memory-dialog .field-log-viewer-section {
  border-top-color: rgba(93,79,56,0.14);
}
.public-memory-dialog .field-log-viewer-value,
.public-memory-dialog .cloud-item-meta,
.public-memory-dialog .my-gear-meta,
.local-memory-dialog .field-log-viewer-value,
.local-memory-dialog .cloud-item-meta,
.local-memory-dialog .my-gear-meta {
  font-family: inherit;
}
@keyframes diaryBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes diaryMemoryOpen {
  from { opacity: 0; transform: translateY(10px) scale(.955); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .diary-memory-backdrop,
  .diary-memory-dialog,
  .info-admin-modal-backdrop,
  body.info-admin-editing .info-admin-panel.active {
    animation: none;
  }
  .diary-entry-card.opening-viewer {
    transform: none;
  }
}
.field-log-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.field-list-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 12px; }
.field-list-title { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: 0.10em; text-transform: uppercase; }
.field-log-filters { display: grid; grid-template-columns: repeat(2, minmax(128px, 0.7fr)) repeat(4, minmax(132px, 0.85fr)) minmax(180px, 1.2fr) auto; gap: 8px; align-items: center; margin: 14px 0 10px; }
.field-log-filters input, .field-log-filters select {
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 10px 11px;
  font-family: inherit;
  font-size: 13px;
  min-width: 0;
  outline: none;
}
.field-log-filter-meta { color: var(--muted); font-size: 12px; font-weight: 800; margin: 0 0 8px; }
.field-log-card {
  background: var(--card-fill);
  border: 1px solid rgba(158,139,96,0.30);
  border-radius: var(--card-radius);
  padding: 14px;
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.field-log-card:active {
  background: color-mix(in srgb, var(--card-fill) 88%, var(--olive) 8%);
}
.field-log-card.selected {
  border-color: var(--olive);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--olive) 30%, transparent);
  background: color-mix(in srgb, var(--card-fill) 82%, var(--olive) 12%);
}
.field-log-card::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 74px;
  height: 74px;
  border: 2px solid color-mix(in srgb, var(--rust) 55%, transparent);
  border-radius: 999px;
  opacity: 0.20;
  transform: rotate(-12deg);
}
.field-log-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.field-log-date { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: 0.04em; }
.field-log-badge { background: var(--control-bg); border: 1px solid var(--card-border); border-radius: 999px;
                   color: var(--ink); font-size: 11px; font-weight: 800; padding: 3px 8px; white-space: nowrap; }
.field-log-card-photo {
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--control-radius);
  overflow: hidden;
  background: color-mix(in srgb, var(--field-bg) 82%, white 8%);
  aspect-ratio: 4 / 3;
}
.field-log-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-field-log-card .field-log-card-photo { aspect-ratio: 16 / 9; margin-top: 8px; }
.field-log-title { font-size: 18px; font-weight: 900; line-height: 1.25; color: var(--ink); }
.field-log-place { color: var(--muted); font-size: 13px; line-height: 1.5; min-height: 20px; }
.field-log-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.field-log-stat { background: color-mix(in srgb, var(--field-bg) 74%, var(--olive) 10%);
                  border: 1px solid rgba(158,139,96,0.22); border-radius: var(--control-radius);
                  padding: 8px 6px; text-align: center; min-width: 0; }
.field-log-stat-label { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.field-log-stat-value { color: var(--ink); font-size: 13px; font-weight: 900; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-log-memo { color: var(--muted); font-size: 12px; line-height: 1.55; min-height: 36px;
                  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.field-log-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.field-log-actions .cloud-item-actions {
  flex: 1 1 100%;
  width: 100%;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 0;
}
.field-log-actions .btn-mini { min-height: 30px; padding: 6px 8px; }
.field-log-visibility { color: var(--muted); font-size: 11px; font-weight: 800; }
.field-public-control {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  border: 1px solid rgba(158,139,96,0.28);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--field-bg) 86%, var(--olive) 14%);
  padding: 8px 10px;
}
.field-public-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}
.field-public-copy {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.field-public-actions {
  display: grid;
  grid-template-columns: minmax(124px, 0.85fr) minmax(150px, 1fr);
  gap: 8px;
  align-items: center;
}
.field-public-control select {
  width: 100%;
  max-width: none;
  border: 1px solid rgba(158,139,96,0.34);
  border-radius: var(--control-radius);
  background: var(--field-bg);
  color: var(--ink);
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}
.field-public-control .field-public-toggle {
  width: 100%;
  justify-content: flex-start;
  min-height: 36px;
  padding: 5px 10px 5px 6px;
  white-space: nowrap;
}
.field-public-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(158,139,96,0.34);
  border-radius: 999px;
  padding: 5px 10px 5px 5px;
  background: rgba(255,250,238,0.55);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.field-public-toggle .toggle-track {
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: rgba(93,79,56,0.22);
  position: relative;
}
.field-public-toggle .toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.18s ease;
}
.field-public-toggle.active { color: var(--olive); background: color-mix(in srgb, var(--field-bg) 74%, var(--olive) 26%); }
.field-public-toggle.active .toggle-track { background: var(--olive); }
.field-public-toggle.active .toggle-track::after { transform: translateX(14px); }
.field-route-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}
#field-log-form .field-route-metrics {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}
.field-standard-ct-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  width: 100%;
}
#field-log-form .field-standard-ct-row {
  grid-column: 1 / -1;
}
#field-log-form .field-standard-ct-row > .field-mobile-labeled-control {
  width: 100%;
  min-width: 0;
}
.field-route-metrics .field-mobile-labeled-control {
  min-width: 0;
}
.field-route-metrics .field-mobile-labeled-control span {
  white-space: nowrap;
  font-size: 11px;
}
body[data-theme="americana"] .field-log-card::after { border-color: #9c3827; opacity: 0.32; }
body[data-theme="modern"] .field-log-card { background: rgba(15, 25, 27, 0.9); border-color: #273638; }
body[data-theme="modern"] .field-log-stat { background: rgba(25, 39, 43, 0.96); border-color: #273638; }
input:not(:placeholder-shown),
textarea:not(:placeholder-shown),
select:not(:has(option[value=""]:checked)) {
  background: color-mix(in srgb, var(--field-bg) 72%, var(--olive) 12%);
}
body[data-theme="modern"] input:not(:placeholder-shown),
body[data-theme="modern"] textarea:not(:placeholder-shown),
body[data-theme="modern"] select:not(:has(option[value=""]:checked)) {
  background: color-mix(in srgb, var(--field-bg) 74%, var(--olive) 18%);
}

body[data-theme="notebook"] {
  --paper: #fbf7ea;
  --paper-deep: #efe6ce;
  --ink: #2f2b24;
  --muted: #746d60;
  --line: rgba(93, 79, 56, 0.12);
  --olive: #384f24;
  --rust: #a34f22;
  --bluegray: #3f5660;
  --header-bg: #faf4e5;
  --header-border: #ded2b7;
  --card-border: #ded2b7;
  --control-bg: #f1e8d4;
  --control-hover: #fbf4e4;
  --field-bg: rgba(255,253,246,0.78);
  --card-fill: rgba(255,253,246,0.66);
  --card-radius: 6px;
  --control-radius: 4px;
  --font-main: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", sans-serif;
}
body[data-theme="notebook"] {
  font-weight: 500;
  background:
    radial-gradient(circle at 16% 10%, rgba(255,255,255,0.74), transparent 25%),
    radial-gradient(circle at 82% 14%, rgba(222,232,218,0.34), transparent 28%),
    linear-gradient(126deg, transparent 0 37%, rgba(118,139,130,0.055) 37.2% 37.8%, transparent 38% 100%),
    linear-gradient(142deg, transparent 0 48%, rgba(118,139,130,0.045) 48.2% 48.8%, transparent 49% 100%),
    linear-gradient(27deg, transparent 0 54%, rgba(176,143,96,0.038) 54.2% 54.7%, transparent 55% 100%),
    radial-gradient(circle, rgba(93,79,56,0.065) 0 0.65px, transparent 0.75px),
    #fbf7ea;
  background-size: auto, auto, auto, auto, auto, 9px 9px, auto;
}
body[data-theme="notebook"] .app-subtitle,
body[data-theme="notebook"] .auth-user,
body[data-theme="notebook"] .field-log-meta,
body[data-theme="notebook"] .total-sub,
body[data-theme="notebook"] .cloud-item-meta,
body[data-theme="notebook"] .mountain-meta,
body[data-theme="notebook"] .campground-meta {
  font-weight: 700;
}
body[data-theme="notebook"] h1,
body[data-theme="notebook"] h2,
body[data-theme="notebook"] h3,
body[data-theme="notebook"] .home-title,
body[data-theme="notebook"] .home-panel-title,
body[data-theme="notebook"] .field-list-title,
body[data-theme="notebook"] .field-log-title,
body[data-theme="notebook"] .field-log-viewer-title,
body[data-theme="notebook"] .pack-title,
body[data-theme="notebook"] .pack-hero-title,
body[data-theme="notebook"] .pack-cloud-title,
body[data-theme="notebook"] .gear-title,
body[data-theme="notebook"] .cloud-item-title,
body[data-theme="notebook"] .mountain-card-title,
body[data-theme="notebook"] .campground-card-title,
body[data-theme="notebook"] .trip-title,
body[data-theme="notebook"] .trip-stat-value {
  font-family: var(--font-hand);
  letter-spacing: 0.01em;
}
body[data-theme="notebook"] .field-log-memo,
body[data-theme="notebook"] .field-log-viewer-value,
body[data-theme="notebook"] .diary-memory-text,
body[data-theme="notebook"] .diary-compose textarea,
body[data-theme="notebook"] .shared-note,
body[data-theme="notebook"] textarea {
  font-family: var(--font-hand);
  letter-spacing: 0.01em;
}
body[data-theme="notebook"] input,
body[data-theme="notebook"] select,
body[data-theme="notebook"] button,
body[data-theme="notebook"] .field-log-stat-value,
body[data-theme="notebook"] .pack-stat-value {
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", sans-serif;
  font-weight: 700;
}
body[data-theme="americana"] {
  --paper: #f8e7c4;
  --paper-deep: #e7c079;
  --ink: #213544;
  --muted: #6b5d4b;
  --line: rgba(91, 75, 49, 0.18);
  --olive: #2f5f48;
  --rust: #b8572d;
  --bluegray: #4f8fa8;
  --header-bg: #c6e7f5;
  --header-border: #7fb1c7;
  --card-border: #c28a4e;
  --control-bg: #f5d9a7;
  --control-hover: #fff0ce;
  --field-bg: rgba(255,247,225,0.82);
  --card-fill: rgba(255,250,235,0.68);
  --card-radius: 5px;
  --control-radius: 4px;
  --font-main: Impact, "Arial Narrow", "Helvetica Neue", sans-serif;
}
body[data-theme="nordic"] {
  --paper: #f7f8f4;
  --paper-deep: #e9eee5;
  --ink: #26302d;
  --muted: #67736d;
  --line: rgba(121, 142, 130, 0.16);
  --olive: #5b755f;
  --rust: #8a6f58;
  --bluegray: #5f7982;
  --header-bg: #fbfcf8;
  --header-border: #d8dfd5;
  --card-border: #d8dfd5;
  --control-bg: #edf2ea;
  --control-hover: #f6f8f3;
  --field-bg: rgba(255,255,255,0.82);
  --card-fill: rgba(255,255,255,0.64);
  --card-radius: 8px;
  --control-radius: 6px;
  --font-main: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}
body[data-theme="modern"] {
  --paper: #11191a;
  --paper-deep: #0c1112;
  --ink: #edf4f2;
  --muted: #9aa7a3;
  --line: rgba(145, 171, 165, 0.10);
  --olive: #2563eb;
  --rust: #f59e0b;
  --bluegray: #8bd3dd;
  --shadow: rgba(0, 0, 0, 0.34);
  --header-bg: #0c1112;
  --header-border: #253233;
  --card-border: #273638;
  --control-bg: #172224;
  --control-hover: #1d2c2f;
  --field-bg: rgba(17, 28, 31, 0.86);
  --card-fill: rgba(19, 29, 31, 0.74);
  --card-radius: 8px;
  --control-radius: 6px;
  --font-main: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", sans-serif;
}

body[data-theme="standard"] {
  --paper: #f5f5f7;
  --paper-deep: #e8e8ed;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.13);
  --olive: #0a84ff;
  --olive-soft: #d6eaff;
  --rust: #ff9f0a;
  --bluegray: #5e6b78;
  --shadow: rgba(0, 0, 0, 0.12);
  --header-bg: rgba(255, 255, 255, 0.86);
  --header-border: rgba(60, 60, 67, 0.18);
  --card-border: rgba(60, 60, 67, 0.16);
  --control-bg: rgba(242, 242, 247, 0.92);
  --control-hover: rgba(229, 229, 234, 0.94);
  --field-bg: rgba(255, 255, 255, 0.86);
  --card-fill: rgba(255, 255, 255, 0.74);
  --card-radius: 8px;
  --control-radius: 7px;
  --font-main: "Avenir Next", "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", sans-serif;
}
body[data-theme="americana"] {
  background:
    radial-gradient(circle at 18% 8%, rgba(255,255,255,0.72), transparent 24%),
    linear-gradient(180deg, #d8eff8 0%, #f4d69b 36%, #c6894a 100%);
}
body[data-theme="americana"] header {
  color: #213544;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.48), rgba(255,255,255,0.08)),
    linear-gradient(135deg, #d4f0f8 0%, #9dcee2 58%, #f1c37a 100%);
  border-color: #7fb1c7;
}
body[data-theme="americana"] header h1 { text-transform: uppercase; letter-spacing: 0.04em; }
body[data-theme="americana"] header .tag { color: #81401e; border-color: #c28a4e; background: rgba(255,248,226,0.74); }
body[data-theme="americana"] .auth-user,
body[data-theme="americana"] .theme-switch label { color: #385567; }
body[data-theme="americana"] .btn-auth,
body[data-theme="americana"] .theme-switch select { background: rgba(255,250,235,0.82); color: #213544; border-color: #8bb7c8; }
body[data-theme="americana"] .btn-primary,
body[data-theme="americana"] .tab-btn.active,
body[data-theme="americana"] .btn-add { background: #2f5f48; }
body[data-theme="americana"] .btn-primary:hover,
body[data-theme="americana"] .btn-add:hover { background: #244d3b; }
body[data-theme="americana"] .pack-illustration {
  min-height: 128px;
  background:
    linear-gradient(180deg, rgba(219,239,248,0.78), rgba(244,214,155,0.28)),
    linear-gradient(135deg, transparent 0 45%, rgba(47,95,72,0.66) 45% 48%, transparent 48%),
    linear-gradient(45deg, transparent 0 54%, rgba(79,143,168,0.46) 54% 56%, transparent 56%),
    #efd099;
}
body[data-theme="americana"] .pack-stat { background: #213544; color: #fff8e6; border-color: #4f8fa8; }
body[data-theme="americana"] .pack-stat-label,
body[data-theme="americana"] .pack-stat-unit { color: #f1c37a; }
body[data-theme="americana"] .pack-stat-value { color: #fff4d8; }
body[data-theme="nordic"] {
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,0.85), transparent 24%),
    linear-gradient(120deg, rgba(91,117,95,0.08), transparent 42%),
    #eef1ec;
}
body[data-theme="nordic"] .search-card,
body[data-theme="nordic"] .gear-card,
body[data-theme="nordic"] .pack-card,
body[data-theme="nordic"] .pack-library-panel,
body[data-theme="nordic"] .pack-detail-panel,
body[data-theme="nordic"] .field-card { background: var(--paper); }
body[data-theme="nordic"] .pack-illustration {
  background:
    linear-gradient(120deg, transparent 0 60%, rgba(91,117,95,0.18) 60% 62%, transparent 62%),
    linear-gradient(40deg, transparent 0 45%, rgba(95,121,130,0.12) 45% 47%, transparent 47%),
    #fbfcf8;
}
body[data-theme="standard"] {
  color-scheme: light;
  background:
    radial-gradient(circle at 18% 8%, rgba(255,255,255,0.86), transparent 26%),
    linear-gradient(180deg, #fbfbfd 0%, #f2f2f7 100%);
}
body[data-theme="standard"] {
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
body[data-theme="standard"] h1,
body[data-theme="standard"] h2,
body[data-theme="standard"] h3,
body[data-theme="standard"] .home-title,
body[data-theme="standard"] .home-panel-title,
body[data-theme="standard"] .field-list-title,
body[data-theme="standard"] .field-log-title,
body[data-theme="standard"] .field-log-viewer-title,
body[data-theme="standard"] .pack-title,
body[data-theme="standard"] .pack-hero-title,
body[data-theme="standard"] .pack-cloud-title,
body[data-theme="standard"] .gear-title,
body[data-theme="standard"] .cloud-item-title,
body[data-theme="standard"] .mountain-card-title,
body[data-theme="standard"] .campground-card-title,
body[data-theme="standard"] .trip-title,
body[data-theme="standard"] .diary-compose-title {
  font-family: "Avenir Next", "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}
body[data-theme="standard"] button,
body[data-theme="standard"] input,
body[data-theme="standard"] select,
body[data-theme="standard"] textarea,
body[data-theme="standard"] .btn-mini,
body[data-theme="standard"] .btn-clear,
body[data-theme="standard"] .engagement-btn {
  font-family: inherit;
}
body[data-theme="standard"] .public-diary-card .field-log-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.58;
}
body[data-theme="standard"] .public-field-log-card .field-log-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.38;
}
body[data-theme="standard"] .public-diary-card .field-log-place,
body[data-theme="standard"] .public-field-log-card .field-log-place {
  font-weight: 500;
}
body[data-theme="standard"] .public-diary-viewer-text {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.78;
}
body[data-theme="standard"] header {
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  box-shadow: 0 1px 0 rgba(60, 60, 67, 0.10), 0 10px 28px rgba(0, 0, 0, 0.07);
}
body[data-theme="standard"] .theme-switch label,
body[data-theme="standard"] .auth-user { color: var(--muted); }
body[data-theme="standard"] .btn-primary,
body[data-theme="standard"] .tab-btn.active,
body[data-theme="standard"] .btn-add { background: var(--olive); }
body[data-theme="standard"] .btn-primary:hover,
body[data-theme="standard"] .btn-add:hover { background: #0071e3; }
body[data-theme="standard"] .search-card,
body[data-theme="standard"] .gear-card,
body[data-theme="standard"] .pack-card,
body[data-theme="standard"] .pack-library-panel,
body[data-theme="standard"] .pack-detail-panel,
body[data-theme="standard"] .field-card,
body[data-theme="standard"] .shared-card {
  background: var(--card-fill);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

body[data-theme="modern"] {
  background:
    radial-gradient(circle at 78% 8%, rgba(37,99,235,0.20), transparent 30%),
    linear-gradient(90deg, rgba(103,232,249,0.05) 1px, transparent 1px),
    linear-gradient(rgba(103,232,249,0.04) 1px, transparent 1px),
    #070b0c;
  background-size: auto, 28px 28px, 28px 28px, auto;
}
body[data-theme="modern"] header { color: var(--ink); }
body[data-theme="modern"] .search-card,
body[data-theme="modern"] .gear-card,
body[data-theme="modern"] .pack-card,
body[data-theme="modern"] .pack-library-panel,
body[data-theme="modern"] .pack-detail-panel,
body[data-theme="modern"] .field-card,
body[data-theme="modern"] .shared-card {
  background: linear-gradient(var(--line) 1px, transparent 1px), rgba(17,25,26,0.94);
  background-size: 100% 28px;
}
body[data-theme="modern"] .pack-illustration {
  min-height: 124px;
  background:
    radial-gradient(circle at 74% 20%, rgba(139,211,221,0.14), transparent 25%),
    linear-gradient(145deg, rgba(37,99,235,0.18), transparent 45%),
    #0f191b;
}
body[data-theme="modern"] .mountain-badge.source-official,
body[data-theme="modern"] .campground-badge.source-official,
body[data-theme="modern"] .category-badge::before {
  background: #1f6673;
  color: #f8fafc;
}
body[data-theme="modern"] .home-panel-link,
body[data-theme="modern"] .pack-spec-link,
body[data-theme="modern"] .pack-item-link,
body[data-theme="modern"] .share-status a,
body[data-theme="modern"] .legal-links a,
body[data-theme="modern"] .attribution-line a,
body[data-theme="modern"] .consent-check a {
  color: #a8dce2;
}
body[data-theme="modern"] .pack-stat { background: rgba(15, 25, 27, 0.9); border-color: #273638; }
body[data-theme="modern"] .mountain-card,
body[data-theme="modern"] .campground-card,
body[data-theme="modern"] .db-entry-panel,
body[data-theme="modern"] .mountain-viewer,
body[data-theme="modern"] .campground-viewer,
body[data-theme="modern"] .info-item,
body[data-theme="modern"] .info-admin-panel,
body[data-theme="modern"] .official-social-note,
body[data-theme="modern"] .profile-avatar-panel,
body[data-theme="modern"] .profile-social-panel,
body[data-theme="modern"] .profile-activity-panel,
body[data-theme="modern"] .profile-ai-style-panel,
body[data-theme="modern"] .profile-history-panel,
body[data-theme="modern"] .profile-points-panel,
body[data-theme="modern"] .profile-special-badges,
body[data-theme="modern"] .account-lifecycle-panel,
body[data-theme="modern"] .admin-review-panel,
body[data-theme="modern"] .admin-dashboard-card,
body[data-theme="modern"] .admin-review-card,
body[data-theme="modern"] .admin-user-stat,
body[data-theme="modern"] .admin-feedback-body {
  background: linear-gradient(var(--line) 1px, transparent 1px), rgba(15, 25, 27, 0.94);
  background-size: 100% 28px;
  border-color: #273638;
}
body[data-theme="modern"] .admin-review-panel,
body[data-theme="modern"] .db-entry-panel,
body[data-theme="modern"] .info-admin-panel,
body[data-theme="modern"] .profile-avatar-panel,
body[data-theme="modern"] .profile-social-panel,
body[data-theme="modern"] .profile-activity-panel,
body[data-theme="modern"] .profile-ai-style-panel,
body[data-theme="modern"] .profile-history-panel,
body[data-theme="modern"] .profile-points-panel,
body[data-theme="modern"] .profile-special-badges,
body[data-theme="modern"] .account-lifecycle-panel {
  box-shadow: inset 0 1px 0 rgba(103,232,249,0.04);
}
body[data-theme="modern"].info-admin-editing .info-admin-panel.active {
  background: linear-gradient(var(--line) 1px, transparent 1px), rgba(15, 25, 27, 0.98);
  background-size: 100% 28px;
}
body[data-theme="modern"] .profile-point-stat,
body[data-theme="modern"] .profile-ai-usage,
body[data-theme="modern"] .profile-badge-tile,
body[data-theme="modern"] .profile-special-card,
body[data-theme="modern"] .profile-history-item,
body[data-theme="modern"] .account-security-note {
  background: rgba(17, 28, 31, 0.86);
  border-color: #273638;
}
body[data-theme="modern"] .profile-special-icon {
  background: rgba(103,232,249,0.12);
  color: var(--bluegray);
}
body[data-theme="modern"] input,
body[data-theme="modern"] select,
body[data-theme="modern"] textarea { color-scheme: dark; }

@media (prefers-color-scheme: dark) {
  body[data-theme="standard"] {
    color-scheme: dark;
    --paper: #1c1c1e;
    --paper-deep: #111113;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(235, 235, 245, 0.12);
    --olive: #0a84ff;
    --olive-soft: rgba(10, 132, 255, 0.18);
    --rust: #ffb340;
    --bluegray: #9ba7b4;
    --shadow: rgba(0, 0, 0, 0.34);
    --header-bg: rgba(28, 28, 30, 0.82);
    --header-border: rgba(235, 235, 245, 0.14);
    --card-border: rgba(235, 235, 245, 0.13);
    --control-bg: rgba(44, 44, 46, 0.88);
    --control-hover: rgba(58, 58, 60, 0.94);
    --field-bg: rgba(28, 28, 30, 0.84);
    --card-fill: rgba(30, 30, 32, 0.76);
    background:
      radial-gradient(circle at 78% 8%, rgba(10,132,255,0.18), transparent 30%),
      linear-gradient(180deg, #111113 0%, #1c1c1e 100%);
  }
  body[data-theme="standard"] header {
    box-shadow: 0 1px 0 rgba(235, 235, 245, 0.10), 0 12px 32px rgba(0, 0, 0, 0.32);
  }
  body[data-theme="standard"] input,
  body[data-theme="standard"] select,
  body[data-theme="standard"] textarea {
    color-scheme: dark;
  }
  body[data-theme="standard"] .btn-primary:hover,
  body[data-theme="standard"] .btn-add:hover { background: #409cff; }
  body[data-theme="standard"] .search-card,
  body[data-theme="standard"] .gear-card,
  body[data-theme="standard"] .pack-card,
  body[data-theme="standard"] .pack-library-panel,
  body[data-theme="standard"] .pack-detail-panel,
  body[data-theme="standard"] .field-card,
  body[data-theme="standard"] .shared-card {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  }
}
body[data-theme="notebook"] .search-card,
body[data-theme="notebook"] .gear-card,
body[data-theme="notebook"] .pack-card,
body[data-theme="notebook"] .pack-library-panel,
body[data-theme="notebook"] .pack-detail-panel,
body[data-theme="notebook"] .field-card,
body[data-theme="notebook"] .shared-card {
  position: relative;
  overflow: hidden;
  padding-left: 44px;
}
body[data-theme="notebook"] .pack-library-panel {
  position: relative;
  top: auto;
}
body[data-theme="notebook"] .search-card::before,
body[data-theme="notebook"] .gear-card::before,
body[data-theme="notebook"] .pack-card::before,
body[data-theme="notebook"] .pack-library-panel::before,
body[data-theme="notebook"] .pack-detail-panel::before,
body[data-theme="notebook"] .field-card::before,
body[data-theme="notebook"] .shared-card::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 16px;
  bottom: 16px;
  width: 14px;
  background:
    radial-gradient(circle at 7px 7px, transparent 0 3px, #3b3429 3.5px 5px, transparent 5.5px) 0 0 / 14px 30px repeat-y;
  opacity: 0.76;
}
body[data-theme="notebook"] .search-card::after,
body[data-theme="notebook"] .gear-card::after,
body[data-theme="notebook"] .pack-card::after,
body[data-theme="notebook"] .pack-library-panel::after,
body[data-theme="notebook"] .pack-detail-panel::after,
body[data-theme="notebook"] .field-card::after,
body[data-theme="notebook"] .shared-card::after {
  content: "";
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(93, 79, 56, 0.22);
}
@media (min-width: 760px) {
  .tab-panel {
    min-width: 0;
  }
}
@media (max-width: 900px) {
  .packs-workspace { grid-template-columns: 1fr; }
  .pack-library-panel { position: static; }
  .pack-library-list { max-height: none; }
  .packing-workbench { grid-template-columns: 1fr; }
  .packing-gear-filter-row { grid-template-columns: minmax(0, 1fr) minmax(150px, 220px); align-items: stretch; }
  .packing-gear-filter-row .btn-pack { grid-column: 1 / -1; justify-self: end; min-width: 132px; }
  .packing-gear-tools .btn-pack { min-height: 38px; }
  .field-map-search { grid-template-columns: 1fr; }
  .field-db-picker { padding: 10px; align-items: start; }
  .field-db-picker-card { max-height: calc(100vh - 20px); }
}
@media (min-width: 641px) and (max-width: 900px) {
  .home-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-action-button {
    min-height: 72px;
  }
}
@media (max-width: 640px) {
  body.diary-compose-open,
  body.diary-location-dialog-open {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: pan-y;
  }
  header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: calc(6px + env(safe-area-inset-top)) 10px 6px;
    min-height: calc(48px + env(safe-area-inset-top));
    overflow: visible;
  }
  body[data-theme="notebook"] {
    background:
      radial-gradient(circle at 18% 8%, rgba(255,255,255,0.78), transparent 28%),
      linear-gradient(128deg, transparent 0 42%, rgba(118,139,130,0.055) 42.2% 42.8%, transparent 43% 100%),
      linear-gradient(26deg, transparent 0 58%, rgba(176,143,96,0.04) 58.2% 58.8%, transparent 59% 100%),
      radial-gradient(circle, rgba(93,79,56,0.06) 0 0.6px, transparent 0.7px),
      #fbf7ea;
    background-size: auto, auto, auto, 9px 9px, auto;
  }
  body[data-theme="notebook"] header {
    background: #faf4e5;
  }
  header, .container, .site-footer, .tab-panel, .pack-card, .gear-card, .search-card,
  .field-card, .shared-card, .home-panel, .home-hero, .packing-panel, .packing-pack-picker,
  .pack-library-panel, .pack-detail-panel, .mountain-card, .campground-card,
  .field-log-card, .info-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .tab-panel, .pack-card, .gear-card, .search-card, .field-card, .shared-card,
  .home-panel, .packing-panel, .pack-library-panel, .pack-detail-panel,
  .mountain-card, .campground-card, .field-log-card, .info-card {
    overflow-wrap: anywhere;
  }
  .brand-area { width: auto; flex-wrap: nowrap; gap: 5px; min-width: 0; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
  .brand-word {
    display: inline-block;
    max-width: 42px;
    overflow: hidden;
    font-size: 0;
  }
  .brand-word::after {
    content: "PLB";
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
  }
  header .tag, .app-subtitle { display: none; }
  .app-subtitle { width: 100%; max-width: none; }
  .app-subtitle-main, .app-subtitle-sub { white-space: normal; overflow: visible; text-overflow: clip; }
  .top-workbar { display: contents; }
  .global-search {
    order: 0;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    justify-content: flex-end;
  }
  .global-search-toggle {
    width: 38px;
    height: 38px;
    box-shadow: none;
  }
  .search-lens-icon { width: 20px; height: 20px; }
  .search-lens-icon::before { width: 10px; height: 10px; border-width: 2.5px; }
  .search-lens-icon::after { left: 13px; top: 14px; width: 8px; height: 2.5px; }
  .global-search.expanded .global-search-form {
    position: fixed;
    top: calc(54px + env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    padding: 8px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    z-index: 300;
  }
  .global-search-results {
    position: fixed;
    top: calc(106px + env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    max-height: min(62vh, 520px);
    z-index: 295;
  }
  .tab-stack { grid-column: 1; grid-row: auto; position: relative; overflow: visible; }
  .tabs { order: 1; margin: 0; overflow: visible; padding-bottom: 0; }
  .container { padding: 12px 10px calc(92px + env(safe-area-inset-bottom)); max-width: 100vw; }
  .mobile-menu-toggle { display: none; }
  .mobile-floating-menu {
    display: flex;
    position: fixed;
    top: calc(6px + env(safe-area-inset-top));
    right: 8px;
    z-index: 260;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--paper) 88%, white 12%);
    color: var(--ink);
    box-shadow: 0 10px 26px rgba(47,43,36,0.20);
    cursor: pointer;
  }
  .mobile-floating-menu .hamburger-icon,
  .mobile-floating-menu .hamburger-icon::before,
  .mobile-floating-menu .hamburger-icon::after { width: 22px; }
  .tab-main-nav {
    display: none !important;
    position: fixed;
    top: calc(52px + env(safe-area-inset-top));
    left: 12px;
    right: auto;
    width: min(292px, calc(100vw - 24px));
    z-index: 120;
    flex-direction: column;
    gap: 6px;
    max-height: min(72vh, 520px);
    overflow: auto;
    padding: 8px;
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 18px 40px rgba(47,43,36,0.28);
  }
  .tab-stack.mobile-open .tab-main-nav { display: flex !important; }
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(7px + env(safe-area-inset-bottom));
    z-index: 240;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(158,139,96,0.34);
    border-radius: 20px;
    background: color-mix(in srgb, var(--paper) 96%, white 4%);
    box-shadow: 0 16px 38px rgba(47,43,36,0.26);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .mobile-bottom-tab {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 58px;
    border: 1px solid transparent;
    border-radius: 15px;
    background: transparent;
    color: color-mix(in srgb, var(--ink) 72%, var(--muted));
    padding: 7px 2px 6px;
    font: inherit;
    cursor: pointer;
  }
  .mobile-bottom-tab span {
    display: block;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
  }
  .mobile-bottom-tab .mobile-bottom-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
  }
  .mobile-bottom-tab .mobile-bottom-icon .plb-icon {
    width: 25px;
    height: 25px;
  }
  .mobile-bottom-tab strong {
    display: block;
    font-size: 12px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .mobile-bottom-tab.active {
    background: color-mix(in srgb, var(--olive) 22%, var(--control-bg));
    border-color: color-mix(in srgb, var(--olive) 42%, var(--card-border));
    color: var(--olive);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--olive) 20%, transparent), 0 6px 14px rgba(54, 76, 42, 0.14);
  }
  .side-nav-label { display: none !important; }
  .side-pack-list { display: none !important; }
  .tab-btn { width: 100%; justify-content: flex-start; flex: 0 0 auto; white-space: nowrap; padding: 10px 12px; }
  .tab-btn.has-unread-info,
  .tab-btn.has-admin-review { padding-right: 24px; }
  .theme-switch { display: none; }
  .auth-area { width: auto; margin-left: auto; justify-content: flex-end; gap: 4px; padding-right: 43px; }
  .header-rank-chip { padding: 3px 7px 3px 3px; gap: 4px; }
  .header-rank-chip img { width: 23px; height: 23px; }
  .header-rank-name { display: none; }
  .header-rank-points { font-size: 11px; }
  .header-rank-ai { display: none; }
  .header-special-badge { min-height: 31px; padding: 4px 8px; font-size: 10px; }
  .header-special-badge-label { display: none; }
  .auth-user { display: none; }
  .btn-profile, .btn-auth { flex: 0 0 auto; min-height: 38px; }
  .btn-profile { width: 38px; height: 38px; }
  .btn-auth { min-height: 38px; max-width: 126px; padding: 7px 9px; font-size: 11px; }
  .home-guest-entry { grid-template-columns: 1fr; }
  .home-guest-entry-actions { justify-content: stretch; }
  .home-guest-entry-actions button { width: 100%; }
  .input-row, .pack-title-row { flex-direction: column; }
  .input-row input, .input-row button, .pack-title-row input, .pack-title-row button,
  .btn-primary, .btn-clear, .btn-add, .btn-link, .btn-amazon {
    max-width: 100%;
  }
  .field-grid, .field-log-filters, .explore-filter-grid, .pack-context-grid, .edit-grid, .spec-grid,
  .pack-hero, .pack-dashboard-grid, .pack-stat-grid, .packing-workbench, .home-grid, .home-stats, .mountain-layout, .mountain-tools, .campground-layout, .campground-tools, .trip-layout, .trip-tools, .trip-stats, .trip-builder-grid, .trip-point-row, .profile-grid { grid-template-columns: 1fr; }
  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .home-stat {
    padding: 10px;
  }
  .home-stat-label {
    font-size: 10px;
    letter-spacing: 0.03em;
  }
  .home-stat-value {
    font-size: 21px;
    line-height: 1.05;
    margin-top: 5px;
  }
  .home-stat-note {
    font-size: 10px;
    line-height: 1.3;
  }
  .db-mobile-filter-bar {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    margin: 8px 0 2px;
  }
  .db-filter-open,
  .db-filter-reset {
    min-height: 40px;
    border-radius: 999px;
    padding-inline: 16px;
  }
  .mountain-tools,
  .campground-tools {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(72px + env(safe-area-inset-top));
    z-index: 9401;
    gap: 10px;
    width: auto;
    max-height: calc(100dvh - 90px - env(safe-area-inset-top));
    overflow-y: auto;
    padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
    border: 1px solid var(--card-border);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: 0 18px 60px rgba(0,0,0,0.28);
  }
  body.mountain-filter-open .mountain-tools,
  body.campground-filter-open .campground-tools {
    display: grid;
  }
  .db-filter-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .mountain-tools #mountain-search-text,
  .campground-tools #campground-search-text {
    grid-column: auto;
  }
  .mountain-tools input,
  .mountain-tools select,
  .campground-tools input,
  .campground-tools select {
    width: 100%;
    font-size: 15px;
    padding: 11px 12px;
    border-radius: 14px;
  }
  .mountain-tools > button,
  .campground-tools > button {
    min-height: 44px;
    border-radius: 999px;
  }
  .db-filter-apply {
    display: inline-flex;
    justify-content: center;
    align-items: center;
  }
  body.mountain-filter-open,
  body.campground-filter-open {
    overflow: hidden;
  }
  .home-custom-row { grid-template-columns: auto minmax(0, 1fr); }
  .home-custom-row .btn-mini { grid-column: 1 / -1; width: 100%; }
  .gear-header, .pack-header, .mountain-card-head, .campground-card-head,
  .info-head, .cloud-item, .field-log-top {
    flex-direction: column;
    align-items: stretch;
  }
  .category-badge { margin-left: 0; width: fit-content; max-width: 100%; white-space: normal; }
  .weight-highlight { align-items: flex-start; flex-wrap: wrap; }
  .weight-number { font-size: 30px; }
  .actions, .mountain-actions, .campground-actions, .info-actions, .consent-actions,
  .my-gear-tools, .my-gear-bulk-actions {
    align-items: stretch;
  }
  .actions > *, .mountain-actions > *, .campground-actions > *, .info-actions > *,
  .my-gear-tools > *, .my-gear-bulk-actions > * {
    min-width: 0;
  }
  .mountain-badges, .campground-badges { justify-content: flex-start; }
  .mountain-plan-select, .campground-plan-select { min-width: 0; width: 100%; }
  .profile-activity-grid { grid-template-columns: 1fr; }
  .profile-sticky-actions { align-items: stretch; }
  .profile-sticky-actions .btn-primary,
  .profile-sticky-actions .btn-clear { width: 100%; }
  .db-suggestion-panel { padding: 10px; }
  .db-suggestion-head { display: grid; }
  .db-suggestion-row { grid-template-columns: 1fr; align-items: stretch; }
  .db-suggestion-row input, .db-suggestion-row select, .db-suggestion-body textarea { width: 100%; min-width: 0; }
  .db-suggestion-actions { justify-content: stretch; }
  .db-suggestion-actions button { width: 100%; }
  .db-suggestion-fields { max-height: 55vh; }
  .profile-social-grid { grid-template-columns: 1fr; }
  .profile-points-grid { grid-template-columns: 1fr 1fr; }
  .profile-badge-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .profile-badge-tile { padding: 7px 4px; }
  .profile-badge-tile img { width: 42px; height: 42px; }
  .profile-rank-badge { width: 62px; height: 62px; }
  .profile-points-head { align-items: flex-start; }
  .profile-history-item { grid-template-columns: 1fr; }
  .profile-history-points { white-space: normal; }
  .profile-avatar-panel { grid-template-columns: 1fr; justify-items: start; }
  .profile-special-list { grid-template-columns: 1fr; }
  .profile-card, .profile-grid, .profile-grid > *, .profile-points-panel, .profile-history-panel, .account-lifecycle-panel, .profile-special-badges {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .profile-card {
    margin-left: 0;
    margin-right: 0;
    overflow: hidden;
  }
  .profile-points-head, .profile-rank-main {
    min-width: 0;
  }
  .profile-ai-usage {
    align-items: flex-start;
    flex-direction: column;
  }
  .profile-ai-usage-count { white-space: normal; }
  .profile-rank-points {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: right;
  }
  .info-admin-grid { grid-template-columns: 1fr; }
  .info-admin-actions { align-items: stretch; }
  .info-admin-actions button { width: 100%; }
  .official-social-note { align-items: stretch; flex-direction: column; }
  .official-social-link { text-align: center; width: 100%; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-section-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-review-head { display: grid; }
  .admin-dashboard-grid, .admin-change-row, .admin-review-controls, .admin-user-controls, .admin-user-filterbar, .admin-user-stats { grid-template-columns: 1fr; }
  .admin-user-filterbar input[type="search"] { grid-column: 1 / -1; }
  .admin-review-controls button, .admin-user-controls button, .admin-user-filterbar button { width: 100%; }
  .trip-data-card .trip-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-map-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "map"
      "play"
      "pinTools"
      "trim"
      "export";
  }
  .trip-map-shell { min-height: 340px; height: min(56vh, 520px); }
  .trip-playbar { grid-template-columns: 1fr; }
  .trip-trim-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-trim-actions { grid-template-columns: 1fr; }
  .trip-export-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-export-grid, .trip-export-actions { grid-template-columns: 1fr; }
  .trip-export-label-row { grid-template-columns: 1fr; }
  .trip-export-pin-tools { grid-template-columns: 1fr; }
  .trip-export-pin-list { display: none; }
  .trip-export-pin-row { grid-template-columns: 1fr; }
  .trip-builder-grid input, .trip-point-row input, .trip-tools input[type="text"],
  .trip-generated-gpx { width: 100%; }
  .trip-builder-actions { grid-template-columns: 1fr; }
  .home-grid { width: min(100%, calc(100vw - 20px)); gap: 12px; }
  .home-panel { padding: 14px; border-radius: 10px; }
  .home-hero { min-height: auto; margin: 0 0 12px; border-radius: 16px; }
  .home-hero-shell { grid-template-columns: 1fr; grid-template-areas: "copy" "actions" "strip"; gap: 12px; padding: 18px 14px; }
  .home-hero-copy { gap: 8px; }
  .home-title { font-size: clamp(23px, 7vw, 30px); letter-spacing: 0; line-height: 1.08; }
  .home-subtitle { font-size: 13px; line-height: 1.35; }
  .home-hero-note { display: none; }
  .home-guide-cta {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.48);
  }
  .home-guide-cta-sub { display: none; }
  .home-actions { grid-template-columns: 1fr; max-width: none; justify-self: stretch; gap: 10px; }
  .home-panel[data-home-section="logs"], .home-panel[data-home-section="packs"], .home-panel[data-home-section="diary"], .home-panel[data-home-section="insights"] { grid-column: 1; grid-row: auto; }
  .home-field-log-card { grid-template-columns: 1fr; }
  .home-field-log-thumb { width: 100%; max-height: 180px; }
  .home-action-button { min-height: 60px; border-radius: 14px; padding: 12px 14px; }
  .home-action-title { font-size: 15px; }
  .home-action-note { font-size: 11px; }
  .home-action-icon { width: 36px; height: 36px; }
  .home-action-icon .plb-icon { width: 24px; height: 24px; }
  .home-secondary-actions {
    justify-content: flex-start;
    gap: 6px;
    margin-top: -2px;
  }
  .home-secondary-action {
    min-height: 30px;
    padding: 6px 9px;
    font-size: 11px;
    background: rgba(255,255,255,0.42);
    box-shadow: none;
  }
  .home-onboarding-strip { grid-template-columns: 1fr; align-items: stretch; }
  .home-onboarding-link { text-align: center; }
  .my-gear-filter { grid-template-columns: 1fr; }
  .my-gear-grid, .field-log-grid, .diary-list, .diary-compose-grid, .diary-map-search, .diary-location-choice-grid { grid-template-columns: 1fr; }
  .diary-launch-panel { display: none; }
  .diary-compose.modal-edit {
    inset: 0;
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    min-width: 0;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    border: 0;
    margin: 0;
    padding: calc(12px + env(safe-area-inset-top)) 14px calc(86px + env(safe-area-inset-bottom));
    box-shadow: none;
    background: var(--paper);
    grid-template-rows: none;
    grid-auto-rows: max-content;
    align-content: start;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .diary-compose.modal-edit > * {
    max-width: 100%;
    min-width: 0;
  }
  .diary-compose.modal-edit .diary-edit-banner { order: -10; }
  .diary-compose.modal-edit .diary-sticky-actions {
    order: -30;
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0;
  }
  .diary-compose.modal-edit .diary-compose-head {
    order: -20;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(93,79,56,0.12);
  }
  .diary-compose.modal-edit .diary-compose-close {
    order: -1;
    width: 38px;
    height: 38px;
    font-size: 0;
  }
  .diary-compose.modal-edit .diary-compose-close::before {
    content: "×";
    font-size: 24px;
    line-height: 1;
  }
  .diary-compose.modal-edit .diary-compose-kicker { display: none; }
  .diary-compose.modal-edit .diary-compose-title { font-size: 16px; }
  .diary-compose.modal-edit textarea {
    order: 4;
    min-height: 42vh;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 8px 0;
    font-size: 18px;
    line-height: 1.65;
    resize: none;
  }
  .diary-compose.modal-edit .diary-photo-preview-home { order: 6; max-height: 148px; overflow: auto; }
  .diary-compose.modal-edit .diary-photo-preview { max-height: none; overflow: visible; }
  .diary-compose.modal-edit .photo-drop-hint,
  .diary-compose.modal-edit .diary-location-meta {
    display: none;
  }
  .diary-share-row { padding: 8px; }
  .diary-share-copy small { display: none; }
  .diary-primary-actions {
    order: 7;
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding-top: 10px;
    border-top: 1px solid rgba(93,79,56,0.12);
    background: var(--paper);
  }
  .diary-primary-actions .btn-primary {
    min-width: 94px;
    min-height: 40px;
    border-radius: 999px;
  }
  .diary-bottom-actions {
    display: none;
  }
  .diary-tool-button {
    width: 42px;
    min-height: 42px;
    border-radius: 999px;
  }
  .diary-tool-label,
  .diary-cancel-button { display: none; }
  .diary-location-button {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    border-radius: 999px;
  }
  .diary-advanced-settings {
    order: 6;
    border: 0;
    background: transparent;
  }
  .diary-advanced-settings summary {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--forest);
    background: color-mix(in srgb, var(--control-bg) 88%, var(--paper) 12%);
  }
  .diary-time-row {
    order: 2;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: end;
  }
  .diary-time-row .btn-clear {
    white-space: nowrap;
    padding-inline: 10px;
  }
  .diary-ai-tools {
    align-items: stretch;
  }
  .diary-ai-tools .btn-clear {
    flex: 1 1 128px;
    min-height: 40px;
  }
  .diary-voice-label-desktop {
    display: none;
  }
  .diary-voice-label-mobile {
    display: inline;
  }
  .diary-ai-tools-note {
    flex-basis: 100%;
  }
  .diary-card-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .diary-card-actions .diary-more-body {
    position: static;
    margin-top: 7px;
    box-shadow: none;
  }
  .diary-memory-actions .diary-more-menu {
    flex: 0 0 auto;
  }
  .diary-memory-menu-section {
    display: none;
  }
  .diary-advanced-settings .diary-compose-grid,
  .diary-public-options {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
  }
  .diary-advanced-settings > :not(summary) {
    margin: 0 0 10px;
  }
  .diary-location-dialog {
    padding: 0;
    place-items: stretch;
    overflow: hidden;
    touch-action: none;
  }
  .diary-location-dialog-card {
    width: auto;
    max-width: none;
    min-width: 0;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: calc(12px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
    gap: 9px;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }
  .diary-location-dialog-card > * {
    max-width: 100%;
    min-width: 0;
  }
  .diary-location-choice-grid { grid-template-columns: 1fr; gap: 8px; }
  .diary-location-choice-grid .diary-location-icon-btn { justify-content: center; }
  .diary-map-picker { gap: 7px; padding: 8px; }
  .diary-map-hint { font-size: 11px; line-height: 1.45; }
  .diary-map-shell {
    height: clamp(220px, 42dvh, 320px);
    min-height: 0;
    width: 100%;
    max-width: 100%;
    contain: layout paint;
  }
  #diary-location-map,
  #diary-location-map .maplibregl-canvas-container,
  #diary-location-map .maplibregl-canvas {
    max-width: 100% !important;
  }
  .diary-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .diary-dialog-actions .btn-primary { grid-column: 1 / -1; }
  .diary-compose textarea { min-height: 42vh; font-size: 16px; }
  .diary-fab {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: 58px;
    height: 58px;
    z-index: 245;
  }
  .diary-actions .btn-clear, .diary-actions .btn-primary, .diary-card-actions .btn-mini { min-height: 34px; }
  #diary-viewer {
    padding: 0;
    overflow: hidden;
  }
  .diary-memory-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-inline: 0;
  }
  .plb-update-notice {
    grid-template-columns: 1fr;
    gap: 10px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .plb-update-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }
  .plb-update-actions .btn-primary,
  .plb-update-actions .btn-clear {
    width: 100%;
  }
  .diary-memory-peek {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-inline: 0;
  }
  .diary-memory-peek.prev {
    --peek-rest-x: calc(-50% - 54px);
    --peek-rest-rotate: -3deg;
  }
  .diary-memory-peek.next {
    --peek-rest-x: calc(50% + 54px);
    --peek-rest-rotate: 3deg;
  }
  #diary-viewer.peek-prev .diary-memory-peek.prev {
    transform: translateY(-50%) translateX(calc(-50% - 42px + (var(--diary-swipe-progress) * 28px))) scale(calc(.92 + (var(--diary-swipe-progress) * .045))) rotate(calc(-3deg + (var(--diary-swipe-progress) * 1.6deg)));
  }
  #diary-viewer.peek-next .diary-memory-peek.next {
    transform: translateY(-50%) translateX(calc(50% + 42px - (var(--diary-swipe-progress) * 28px))) scale(calc(.92 + (var(--diary-swipe-progress) * .045))) rotate(calc(3deg - (var(--diary-swipe-progress) * 1.6deg)));
  }
  .diary-memory-head {
    padding: calc(14px + env(safe-area-inset-top)) 14px 12px;
  }
  .diary-memory-kicker {
    font-size: .72rem;
  }
  .diary-memory-title {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
    line-height: 1.28;
  }
  .diary-memory-meta {
    font-size: .88rem;
  }
  .diary-memory-close {
    min-width: 42px;
    min-height: 42px;
  }
  .diary-memory-body {
    gap: 12px;
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  }
  .diary-mobile-meta-stack {
    display: grid;
    gap: 8px;
  }
  .diary-mobile-detail-block {
    display: grid;
    gap: 3px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(93,79,56,0.14);
  }
  .diary-mobile-detail-label,
  .diary-mobile-body-label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .06em;
  }
  .diary-mobile-detail-value {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  .diary-memory-grid {
    display: none;
  }
  .diary-memory-photo-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .diary-memory-photo-tile img {
    aspect-ratio: 4 / 3;
  }
  .diary-mobile-body-label {
    display: block;
    margin-top: 2px;
  }
  .diary-memory-text {
    font-size: max(1rem, 16px);
    line-height: 1.8;
    font-weight: 850;
  }
  .diary-mobile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    align-items: stretch;
    padding-top: 4px;
  }
  .diary-mobile-actions .btn-mini {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    width: 100%;
    padding: 8px 9px;
    font-size: .92rem;
    font-weight: 900;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    gap: 2px;
  }
  .diary-mobile-actions .diary-mobile-icon-action {
    padding-inline: 6px;
  }
  .diary-mobile-actions .btn-mini:disabled {
    opacity: .42;
    cursor: not-allowed;
  }
  .diary-memory-actions .btn-mini { flex: 1 1 140px; }
  .public-diary-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .public-field-log-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .public-diary-card-actions .public-engagement {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    width: 100%;
  }
  .public-field-log-card-actions .public-engagement {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    width: 100%;
  }
  .public-diary-card-actions .engagement-btn,
  .public-diary-card-actions .engagement-summary-chip,
  .public-field-log-card-actions .engagement-btn,
  .public-field-log-card-actions .engagement-summary-chip {
    justify-content: center;
    min-height: 38px;
  }
  .public-diary-card-actions > .btn-mini,
  .public-field-log-card-actions > .btn-mini {
    width: 100%;
    justify-content: center;
    min-height: 40px;
  }
  .public-diary-viewer-meta {
    display: none;
  }
  .public-diary-body-label {
    display: block;
  }
  .public-diary-viewer-actions .public-engagement,
  .public-diary-viewer-actions .mountain-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .public-diary-viewer-actions .engagement-summary-chip,
  .public-diary-viewer-actions .engagement-btn,
  .public-diary-viewer-actions .btn-mini,
  .public-diary-viewer-actions .follow-btn {
    justify-content: center;
    min-height: 40px;
    width: 100%;
  }
  .my-gear-card { gap: 7px; padding: 12px; }
  .gear-db-mode-grid { grid-template-columns: 1fr; }
  .field-log-mode-grid { grid-template-columns: 1fr; }
  .gear-db-community-card {
    grid-template-columns: 86px minmax(0, 1fr);
    column-gap: 9px;
  }
  .my-gear-name { font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
  .my-gear-meta { font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
  .my-gear-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .my-gear-actions .btn-mini { min-height: 34px; font-weight: 800; }
  .gear-visibility { width: fit-content; max-width: 100%; }
  .pack-my-gears-drawer summary { padding: 11px 12px; line-height: 1.4; }
  .pack-my-gears-drawer .my-gear-grid { padding: 0 8px 10px; gap: 8px; }
  .pack-my-gears-drawer .my-gear-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    border-radius: 6px;
  }
  .pack-my-gears-drawer .my-gear-card > div:first-child { min-width: 0; }
  .pack-my-gears-drawer .my-gear-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: normal;
    overflow-wrap: normal;
  }
  .pack-my-gears-drawer .my-gear-meta { grid-column: 1 / -1; }
  .pack-my-gears-drawer .gear-public-toggle { grid-column: 2; grid-row: 1; }
  .pack-my-gears-drawer .my-gear-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr 1fr; }
  .pack-my-gears-drawer .gear-public-toggle { width: fit-content; }
  .pack-card, .gear-card, .search-card, .field-card, .shared-card,
  .pack-library-panel, .pack-detail-panel, .packing-panel { border-radius: 8px; }
  .pack-detail-panel, .packing-panel { padding: 14px; }
  .packing-pack-picker,
  .packing-start-panel,
  .packing-workspace,
  .my-gear-start-panel,
  .my-gear-add-panel { padding: 14px; border-radius: 8px; }
  .packing-mode-grid,
  .my-gear-mode-grid,
  .my-gear-add-mode-grid,
  .packing-existing-picker,
  .packing-setup-grid { grid-template-columns: 1fr; }
  .my-gear-bulk-grid { grid-template-columns: 1fr; padding: 10px; }
  .my-gear-bulk-actions { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .my-gear-bulk-actions .btn-pack,
  .my-gear-bulk-actions .btn-primary { width: 100%; min-width: 0; }
  .packing-workspace-head { display: grid; gap: 10px; }
  .packing-workspace-actions { display: grid; grid-template-columns: 1fr; }
  .packing-workspace-actions .btn-pack { width: 100%; }
  .packing-picker-grid { grid-template-columns: 1fr; align-items: stretch; }
  .packing-picker-grid .btn-pack { min-height: 38px; }
  .packing-gear-filter-row { grid-template-columns: 1fr; }
  .packing-gear-filter-row .btn-pack { grid-column: auto; justify-self: stretch; }
  .packing-gear-action-row { display: grid; grid-template-columns: 1fr; }
  .packing-gear-action-row .btn-pack, .packing-gear-action-row .btn-primary { width: 100%; min-width: 0; }
  .packing-gear-tools .btn-pack { min-height: 38px; }
  .packing-gear-row { grid-template-columns: 28px minmax(0, 1fr) 72px; padding: 10px; }
  .packing-gear-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
  .packing-gear-sub { white-space: normal; line-height: 1.35; }
  .field-card { width: 100%; max-width: 100%; overflow: hidden; padding: 14px; }
  .field-head { align-items: stretch; flex-direction: column; }
  .field-head .btn-primary { width: 100%; min-height: 38px; }
  .field-log-viewer-head { flex-direction: column; align-items: stretch; }
  .field-log-viewer-head .btn-clear { width: 100%; }
  .field-log-viewer-grid, .mountain-viewer-grid, .campground-viewer-grid, .location-weather-grid { grid-template-columns: 1fr; }

  .external-link-row { grid-template-columns: minmax(0, 1fr); }
  .external-link-row .btn-mini { width: 100%; }

  .field-grid { width: 100%; grid-template-columns: minmax(0, 1fr); }
  .field-log-section-body { grid-template-columns: minmax(0, 1fr); }
  .field-log-sticky-actions {
    grid-template-columns: minmax(96px, .8fr) minmax(136px, 1.2fr);
    padding: 8px;
  }
  .field-grid input, .field-grid select, .field-grid textarea { width: 100%; max-width: 100%; min-width: 0; }
  .time-inputs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; }
  .route-db-actions, .gpx-import-actions, .pack-actions, .field-list-tools, .trip-builder-head, .trip-builder-actions { flex-direction: column; align-items: stretch; }
  .route-db-actions .btn-clear, .gpx-import-actions .btn-clear, .gpx-import-actions .btn-primary,
  .pack-actions .btn-primary, .pack-actions .btn-clear, .field-list-tools .btn-clear { width: 100%; }
  .field-list-tools {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  .field-list-tools .cloud-item-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 100%;
    gap: 6px;
    justify-content: stretch;
  }
  .field-list-tools .cloud-item-actions .btn-clear {
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    white-space: normal;
    line-height: 1.35;
  }
  .field-public-control {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .field-public-head,
  .field-public-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .field-public-control .field-public-toggle {
    width: 100%;
  }
  .field-public-toggle { width: fit-content; }
  .field-route-metrics {
    gap: 6px;
  }
  .field-standard-ct-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }
  .pack-library-panel { position: static; overflow: visible; }
  .pack-library-drawer[open] { display: block; }
  .pack-library-list {
    height: auto;
    min-height: 0;
    max-height: min(62dvh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
    scroll-padding-bottom: 90px;
    touch-action: pan-y;
    padding-right: 10px;
    padding-bottom: 90px;
    box-sizing: border-box;
  }
  .pack-library-drawer summary { padding: 12px; }
  .pack-panel-header { align-items: stretch; }
  .pack-panel-actions { min-width: 88px; }
  .pack-cloud-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pack-cloud-actions { max-width: none; justify-content: flex-start; display: flex; flex-wrap: wrap; }
  .pack-cloud-actions .pack-public-toggle { width: auto; }
  .pack-cloud-actions .btn-mini,
  .pack-cloud-actions .pack-public-toggle { min-height: 34px; }
  .packing-summary { grid-template-columns: 1fr; gap: 8px; }
  .packing-summary-weight { text-align: left; font-size: 34px; }
  .pack-detail-toolbar, .pack-list-header { flex-direction: column; align-items: stretch; }
  .pack-list-actions, .packing-pack-tools {
    justify-content: stretch;
  }
  .pack-list-actions .btn-pack,
  .packing-pack-tools .btn-pack {
    flex: 1 1 150px;
  }
  .pack-primary-actions { display: grid; grid-template-columns: 1fr; }
  .pack-title-block h2 { font-size: 24px; }
  .pack-item-top {
    grid-template-columns: 22px 28px minmax(0, 1fr) auto;
    grid-template-areas:
      "handle check category category"
      "handle check main weight"
      "actions actions actions actions";
    gap: 6px 9px;
    align-items: start;
    padding: 12px;
  }
  .pack-drag-handle { grid-area: handle; padding-top: 1px; }
  .pack-check { grid-area: check; }
  .pack-item-category { grid-area: category; min-width: 0; font-size: 11px; }
  .pack-item-main { grid-area: main; min-width: 0; }
  .pack-item-name {
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: normal;
    word-break: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .pack-item-brand { line-height: 1.35; white-space: normal; }
  .pack-item-weight { grid-area: weight; white-space: nowrap; font-size: 15px; }
  .pack-item-right { grid-area: actions; justify-content: stretch; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .pack-item-right .btn-mini { min-height: 34px; }
  .pack-item-right .pack-item-remove { min-width: 36px; min-height: 34px; border: 1px solid rgba(158,139,96,0.28); border-radius: var(--control-radius); }
  .pack-item-specs { padding: 0 12px 10px; }
  .pack-spec-chip, .pack-spec-link { max-width: 100%; overflow-wrap: anywhere; line-height: 1.45; }
  .packing-pack-list .pack-item-top {
    grid-template-columns: 18px 26px minmax(0, 1fr) auto;
    grid-template-areas:
      "handle check category actions"
      "handle check main actions";
    gap: 6px 8px;
    align-items: center;
    padding: 10px;
  }
  .packing-pack-list .pack-item-right {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 78px;
  }
  .packing-pack-list .pack-item-right .pack-item-weight {
    font-size: 13px;
    line-height: 1;
  }
  .packing-pack-list .pack-item-right .pack-item-remove {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 999px;
    line-height: 1;
  }
  .pack-category-row { grid-template-columns: minmax(0, 1fr) 72px 60px; }
  .pack-edit-grid { grid-template-columns: 1fr; }
  .pack-edit-full, .pack-context-grid textarea { grid-column: 1; }
  .app-guide-body { grid-template-columns: 1fr; }
  .site-footer { padding: 14px 10px calc(112px + env(safe-area-inset-bottom)); }
  .legal-links { gap: 7px 10px; }
  .legal-links a { max-width: 100%; overflow-wrap: anywhere; }
  .consent-gate { padding: 10px; }
  .consent-card { padding: 16px; max-height: calc(100dvh - 20px); border-radius: 8px; }
  .consent-check { min-width: 0; }
  .field-full, .edit-full { grid-column: 1; }
  body[data-theme="notebook"] .search-card,
  body[data-theme="notebook"] .gear-card,
  body[data-theme="notebook"] .pack-card,
  body[data-theme="notebook"] .pack-library-panel,
  body[data-theme="notebook"] .pack-detail-panel,
  body[data-theme="notebook"] .field-card,
  body[data-theme="notebook"] .shared-card { padding-left: 34px; }
  body[data-theme="notebook"] .field-card { padding-left: 42px; }
}


/* Mobile section card menu */
.mobile-section-cards {
  display: none;
}

@media (max-width: 768px) {
  .db-entry-grid, .db-entry-form {
    grid-template-columns: 1fr;
  }

  .mobile-section-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 16px;
    padding: 2px 0;
  }

  .mobile-section-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 76px;
    padding: 10px 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.88));
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    color: #f8fafc;
    text-align: center;
  }

  .mobile-section-card::after {
    content: '›';
    position: absolute;
    right: 8px;
    bottom: 6px;
    color: rgba(226, 232, 240, 0.56);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
  }

  .mobile-section-card:active {
    transform: translateY(1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  }

  .mobile-section-card-primary {
    border-color: rgba(244, 114, 182, 0.46);
    background: linear-gradient(135deg, rgba(131, 24, 67, 0.9), rgba(30, 41, 59, 0.92));
  }

  .mobile-section-card:nth-child(2) {
    border-color: rgba(52, 211, 153, 0.44);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.88), rgba(30, 41, 59, 0.92));
  }

  .mobile-section-card:nth-child(3) {
    border-color: rgba(96, 165, 250, 0.44);
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.78), rgba(30, 41, 59, 0.92));
  }

  .mobile-section-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    font-size: 16px;
  }
  .mobile-section-card-icon .plb-icon {
    width: 21px;
    height: 21px;
  }

  .mobile-section-card-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    width: 100%;
  }

  .mobile-section-card-text strong {
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }

  .mobile-section-card-text small {
    color: rgba(226, 232, 240, 0.78);
    font-size: 9px;
    line-height: 1.3;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .mobile-section-cards {
    gap: 7px;
    margin-top: 10px;
  }

  .mobile-section-card {
    min-height: 72px;
    padding: 9px 7px 11px;
    border-radius: 15px;
  }

  .mobile-section-card-text small {
    display: none;
  }
}


/* Mobile category card color tuning */
@media (max-width: 768px) {
  .mobile-prepare-cards,
  .mobile-community-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-prepare-cards .mobile-section-card-primary {
    border-color: rgba(251, 191, 36, 0.48);
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.9), rgba(30, 41, 59, 0.92));
  }

  .mobile-prepare-cards .mobile-section-card:nth-child(2) {
    border-color: rgba(251, 146, 60, 0.44);
    background: linear-gradient(135deg, rgba(124, 45, 18, 0.88), rgba(30, 41, 59, 0.92));
  }

  .mobile-prepare-cards .mobile-section-card:nth-child(3) {
    border-color: rgba(250, 204, 21, 0.42);
    background: linear-gradient(135deg, rgba(113, 63, 18, 0.86), rgba(30, 41, 59, 0.92));
  }

  .mobile-prepare-cards .mobile-section-card:nth-child(4) {
    border-color: rgba(252, 211, 77, 0.38);
    background: linear-gradient(135deg, rgba(92, 64, 20, 0.82), rgba(30, 41, 59, 0.92));
  }

  .mobile-discover-cards .mobile-section-card-primary {
    border-color: rgba(74, 222, 128, 0.48);
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.9), rgba(30, 41, 59, 0.92));
  }

  .mobile-discover-cards .mobile-section-card:nth-child(2) {
    border-color: rgba(45, 212, 191, 0.44);
    background: linear-gradient(135deg, rgba(19, 78, 74, 0.88), rgba(30, 41, 59, 0.92));
  }

  .mobile-discover-cards .mobile-section-card:nth-child(3) {
    border-color: rgba(56, 189, 248, 0.42);
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.84), rgba(30, 41, 59, 0.92));
  }

  .mobile-community-cards .mobile-section-card-primary {
    border-color: rgba(96, 165, 250, 0.48);
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.88), rgba(30, 41, 59, 0.92));
  }

  .mobile-community-cards .mobile-section-card:nth-child(2) {
    border-color: rgba(244, 114, 182, 0.44);
    background: linear-gradient(135deg, rgba(131, 24, 67, 0.86), rgba(30, 41, 59, 0.92));
  }

  .mobile-community-cards .mobile-section-card:nth-child(3) {
    border-color: rgba(168, 85, 247, 0.42);
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.84), rgba(30, 41, 59, 0.92));
  }

  .mobile-community-cards .mobile-section-card:nth-child(4) {
    border-color: rgba(52, 211, 153, 0.38);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.82), rgba(30, 41, 59, 0.92));
  }
}


/* Mobile card menu horizontal scroll */
@media (max-width: 768px) {
  .mobile-section-cards {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    margin: 12px -14px 16px;
    padding: 2px 14px 8px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(
      90deg,
      transparent 0,
      #000 14px,
      #000 calc(100% - 30px),
      transparent 100%
    );
    mask-image: linear-gradient(
      90deg,
      transparent 0,
      #000 14px,
      #000 calc(100% - 30px),
      transparent 100%
    );
  }

  .mobile-section-cards::-webkit-scrollbar {
    display: none;
  }

  .mobile-section-card {
    flex: 0 0 132px;
    scroll-snap-align: start;
  }

  .mobile-section-cards::after {
    content: '';
    flex: 0 0 10px;
  }

  .mobile-prepare-cards,
  .mobile-community-cards {
    grid-template-columns: none;
  }
}

@media (max-width: 420px) {
  .mobile-section-card {
    flex-basis: 122px;
  }
}


/* Profile settings card */
.profile-settings-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.profile-settings-copy {
  min-width: 0;
}

.profile-settings-select {
  min-width: 220px;
  margin: 0;
}

.profile-settings-select select {
  width: 100%;
}

.profile-ai-style-panel {
  border: 1px solid rgba(158,139,96,0.24);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--field-bg) 88%, var(--paper) 12%);
  padding: 14px;
}
.profile-ai-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.profile-ai-style-grid .profile-full {
  grid-column: 1 / -1;
}

body[data-theme="modern"] .profile-settings-card {
  background: rgba(15, 25, 27, 0.9);
  border-color: #273638;
}

@media (max-width: 768px) {
  .profile-settings-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 4px 0 14px;
    padding: 13px 14px;
  }

  .profile-settings-select {
    min-width: 0;
    width: 100%;
    gap: 7px;
    padding: 11px 12px 12px;
    border: 1px solid rgba(158,139,96,0.26);
    border-radius: var(--control-radius);
    background: color-mix(in srgb, var(--field-bg) 88%, var(--paper) 12%);
  }
  .profile-settings-select .profile-field-label {
    font-size: 12px;
    line-height: 1.25;
  }
  .profile-settings-select select {
    min-height: 54px;
    padding: 13px 42px 13px 14px;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
  }
  .profile-ai-style-grid {
    grid-template-columns: 1fr;
  }
}


/* Mobile menu theme integration */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-tab {
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  }

  .mobile-bottom-tab.active {
    transform: translateY(-1px);
  }

  body[data-theme="notebook"] .mobile-section-card {
    background: linear-gradient(135deg, rgba(255, 252, 241, 0.96), rgba(244, 236, 214, 0.92));
    border-color: rgba(115, 88, 54, 0.22);
    box-shadow: 0 10px 22px rgba(96, 70, 38, 0.12);
    color: #3d3124;
  }

  body[data-theme="notebook"] .mobile-section-card-text strong {
    color: #35281d;
  }

  body[data-theme="notebook"] .mobile-section-card-text small {
    color: rgba(77, 59, 44, 0.72);
  }

  body[data-theme="notebook"] .mobile-section-card-icon {
    background: rgba(122, 91, 55, 0.12);
    color: #4d3b2c;
  }

  body[data-theme="notebook"] .mobile-section-card::after {
    color: rgba(77, 59, 44, 0.48);
  }

  body[data-theme="notebook"] .mobile-bottom-nav {
    background: rgba(255, 252, 241, 0.92);
    border-color: rgba(115, 88, 54, 0.22);
  }

  body[data-theme="notebook"] .mobile-bottom-tab {
    color: rgba(61, 49, 36, 0.78);
  }

  body[data-theme="notebook"] .mobile-bottom-tab.active {
    background: rgba(122, 91, 55, 0.18);
    border-color: rgba(122, 91, 55, 0.30);
    color: #3d3124;
  }

  body[data-theme="americana"] .mobile-section-card {
    background: linear-gradient(135deg, rgba(255, 248, 226, 0.96), rgba(226, 214, 188, 0.9));
    border-color: rgba(129, 64, 30, 0.28);
    box-shadow: 0 12px 24px rgba(33, 53, 68, 0.12);
    color: #213544;
  }

  body[data-theme="americana"] .mobile-section-card-text strong {
    color: #213544;
  }

  body[data-theme="americana"] .mobile-section-card-text small {
    color: rgba(33, 53, 68, 0.72);
  }

  body[data-theme="americana"] .mobile-section-card-icon {
    background: rgba(47, 95, 72, 0.13);
    color: #2f5f48;
  }

  body[data-theme="americana"] .mobile-section-card::after {
    color: rgba(129, 64, 30, 0.48);
  }

  body[data-theme="americana"] .mobile-bottom-nav {
    background: rgba(255, 248, 226, 0.92);
    border-color: rgba(129, 64, 30, 0.24);
  }

  body[data-theme="americana"] .mobile-bottom-tab {
    color: rgba(33, 53, 68, 0.80);
  }

  body[data-theme="americana"] .mobile-bottom-tab.active {
    background: rgba(47, 95, 72, 0.18);
    border-color: rgba(47, 95, 72, 0.30);
    color: #213544;
  }

  body[data-theme="nordic"] .mobile-section-card {
    background: linear-gradient(135deg, rgba(248, 252, 255, 0.96), rgba(228, 238, 246, 0.92));
    border-color: rgba(98, 132, 158, 0.24);
    box-shadow: 0 12px 24px rgba(47, 73, 93, 0.10);
    color: #233746;
  }

  body[data-theme="nordic"] .mobile-section-card-text strong {
    color: #203342;
  }

  body[data-theme="nordic"] .mobile-section-card-text small {
    color: rgba(48, 73, 91, 0.68);
  }

  body[data-theme="nordic"] .mobile-section-card-icon {
    background: rgba(96, 165, 250, 0.12);
    color: #315d78;
  }

  body[data-theme="nordic"] .mobile-section-card::after {
    color: rgba(49, 93, 120, 0.44);
  }

  body[data-theme="nordic"] .mobile-bottom-nav {
    background: rgba(248, 252, 255, 0.92);
    border-color: rgba(98, 132, 158, 0.22);
  }

  body[data-theme="nordic"] .mobile-bottom-tab {
    color: rgba(48, 73, 91, 0.80);
  }

  body[data-theme="nordic"] .mobile-bottom-tab.active {
    background: rgba(96, 165, 250, 0.18);
    border-color: rgba(49, 93, 120, 0.26);
    color: #203342;
  }

  body[data-theme="modern"] .mobile-section-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.88));
    border-color: rgba(148, 163, 184, 0.28);
    color: #f8fafc;
  }

  body[data-theme="modern"] .mobile-section-card-text strong {
    color: #ffffff;
  }

  body[data-theme="modern"] .mobile-section-card-text small {
    color: rgba(226, 232, 240, 0.78);
  }

  body[data-theme="modern"] .mobile-section-card-icon {
    background: rgba(15, 23, 42, 0.54);
    border: 1px solid rgba(148, 163, 184, 0.26);
    color: #ffffff;
  }

  body[data-theme="modern"] .mobile-bottom-nav {
    background: rgba(10, 16, 18, 0.9);
    border-color: rgba(148, 163, 184, 0.20);
  }

  body[data-theme="modern"] .mobile-bottom-tab {
    color: rgba(226, 232, 240, 0.82);
  }

  body[data-theme="modern"] .mobile-bottom-tab.active {
    background: rgba(37, 99, 235, 0.34);
    border-color: rgba(139, 211, 221, 0.34);
    color: #ffffff;
  }
}


/* Mobile menu theme overrides after category colors */
@media (max-width: 768px) {
  body[data-theme="notebook"] .mobile-section-cards .mobile-section-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(255, 238, 241, 0.96), rgba(247, 233, 213, 0.92));
    border-color: rgba(181, 84, 107, 0.28);
  }

  body[data-theme="notebook"] .mobile-section-cards .mobile-section-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(235, 247, 230, 0.96), rgba(244, 236, 214, 0.92));
    border-color: rgba(79, 126, 82, 0.26);
  }

  body[data-theme="notebook"] .mobile-section-cards .mobile-section-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(230, 239, 249, 0.96), rgba(244, 236, 214, 0.92));
    border-color: rgba(83, 116, 153, 0.26);
  }

  body[data-theme="notebook"] .mobile-section-cards .mobile-section-card:nth-child(4) {
    background: linear-gradient(135deg, rgba(247, 241, 226, 0.96), rgba(237, 226, 198, 0.92));
    border-color: rgba(146, 111, 63, 0.24);
  }

  body[data-theme="americana"] .mobile-section-cards .mobile-section-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(255, 237, 209, 0.96), rgba(238, 204, 154, 0.9));
    border-color: rgba(156, 56, 39, 0.34);
  }

  body[data-theme="americana"] .mobile-section-cards .mobile-section-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(229, 241, 225, 0.96), rgba(226, 214, 188, 0.9));
    border-color: rgba(47, 95, 72, 0.30);
  }

  body[data-theme="americana"] .mobile-section-cards .mobile-section-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(224, 239, 246, 0.96), rgba(226, 214, 188, 0.9));
    border-color: rgba(79, 143, 168, 0.30);
  }

  body[data-theme="americana"] .mobile-section-cards .mobile-section-card:nth-child(4) {
    background: linear-gradient(135deg, rgba(248, 232, 211, 0.96), rgba(226, 214, 188, 0.9));
    border-color: rgba(129, 64, 30, 0.28);
  }

  body[data-theme="nordic"] .mobile-section-cards .mobile-section-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(239, 247, 255, 0.96), rgba(222, 235, 244, 0.92));
    border-color: rgba(96, 165, 250, 0.30);
  }

  body[data-theme="nordic"] .mobile-section-cards .mobile-section-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(234, 248, 244, 0.96), rgba(222, 235, 244, 0.92));
    border-color: rgba(45, 171, 142, 0.26);
  }

  body[data-theme="nordic"] .mobile-section-cards .mobile-section-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(241, 244, 252, 0.96), rgba(222, 235, 244, 0.92));
    border-color: rgba(112, 126, 190, 0.24);
  }

  body[data-theme="nordic"] .mobile-section-cards .mobile-section-card:nth-child(4) {
    background: linear-gradient(135deg, rgba(237, 247, 250, 0.96), rgba(222, 235, 244, 0.92));
    border-color: rgba(70, 130, 155, 0.22);
  }

  body[data-theme="modern"] .mobile-section-cards .mobile-section-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(131, 24, 67, 0.9), rgba(30, 41, 59, 0.92));
    border-color: rgba(244, 114, 182, 0.46);
  }

  body[data-theme="modern"] .mobile-section-cards .mobile-section-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.88), rgba(30, 41, 59, 0.92));
    border-color: rgba(52, 211, 153, 0.44);
  }

  body[data-theme="modern"] .mobile-section-cards .mobile-section-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.78), rgba(30, 41, 59, 0.92));
    border-color: rgba(96, 165, 250, 0.44);
  }

  body[data-theme="modern"] .mobile-section-cards .mobile-section-card:nth-child(4) {
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.84), rgba(30, 41, 59, 0.92));
    border-color: rgba(168, 85, 247, 0.42);
  }
}


/* Mobile Pack check modal */
.pack-check-modal {
  display: none;
}

.pack-check-modal.active {
  display: block;
}

.pack-check-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
}

.pack-check-modal-dialog {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 1200;
  width: min(720px, calc(100vw - 20px));
  max-height: min(82dvh, 760px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 24px 24px 0 0;
  background: var(--paper, #fff);
  box-shadow: 0 -18px 44px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
}

.pack-check-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pack-check-modal-header h2 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.pack-check-modal-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px 2px 8px;
}

.pack-check-modal-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.pack-check-modal-item input {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.pack-check-modal-item.checked {
  opacity: 0.68;
}

.pack-check-modal-item.checked strong {
  text-decoration: line-through;
}

.pack-check-modal-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pack-check-modal-copy strong {
  font-size: 14px;
  line-height: 1.32;
}

.pack-check-modal-copy small {
  color: var(--muted, #64748b);
  font-size: 11px;
  line-height: 1.3;
}

.pack-check-modal-actions {
  display: flex;
  gap: 8px;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
}

.pack-check-modal-actions .btn-pack {
  flex: 1 1 0;
  min-height: 40px;
}

body.pack-check-modal-open {
  overflow: hidden;
}

body[data-theme="modern"] .pack-check-modal-dialog {
  background: rgba(15, 25, 27, 0.98);
  border-color: #273638;
  color: #eaf8f5;
}

body[data-theme="modern"] .pack-check-modal-item {
  background: rgba(25, 39, 43, 0.96);
  border-color: #273638;
}

@media (min-width: 769px) {
  .pack-check-modal,
  .pack-check-modal.active {
    display: none;
  }
}


/* Mobile fullscreen Pack check / packing dialogs */
@media (max-width: 768px) {
  .pack-check-modal-dialog {
    position: fixed;
    inset: 0;
    left: 0;
    bottom: auto;
    width: auto;
    height: 100dvh;
    max-height: none;
    transform: none;
    border-radius: 0;
    padding:
      max(14px, env(safe-area-inset-top))
      14px
      max(14px, env(safe-area-inset-bottom));
    box-sizing: border-box;
  }

  .pack-check-modal-header {
    flex: 0 0 auto;
  }

  .pack-check-modal-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 12px;
  }

  .pack-check-modal-actions {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    padding-top: 8px;
    background: inherit;
  }

  .packing-memory-dialog {
    position: fixed;
    inset: 0;
    width: auto;
    height: 100dvh;
    max-width: none;
    max-height: none;
    transform: none;
    border-radius: 0;
    padding:
      max(14px, env(safe-area-inset-top))
      14px
      max(14px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow-y: auto;
  }

  .packing-memory-dialog .diary-memory-body,
  .packing-memory-dialog .packing-confirm-list {
    max-height: none;
    overflow: visible;
  }

  body.pack-check-modal-open,
  body.packing-viewer-open {
    overflow: hidden;
  }
}


/* Mobile Field Log full-screen compose */
.mobile-field-log-head {
  display: none;
}

@media (max-width: 768px) {
  body.field-log-form-open {
    overflow: hidden;
  }

  .field-log-form.modal-edit,
  .field-log-form.modal-edit.active {
    position: fixed;
    inset: 0;
    z-index: 9300;
    display: flex;
    flex-direction: column;
    width: auto;
    max-height: none;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: var(--paper);
    padding:
      max(12px, env(safe-area-inset-top))
      14px
      max(14px, env(safe-area-inset-bottom));
    box-shadow: none;
    box-sizing: border-box;
  }

  .mobile-field-log-head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-border);
  }

  .mobile-field-log-head h2 {
    margin: 1px 0 0;
    font-size: 17px;
    line-height: 1.2;
  }

  .field-log-form.modal-edit .field-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 2px 1px 82px;
  }

  .field-log-form.modal-edit .pack-actions {
    position: sticky;
    bottom: 0;
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    margin: 0 -2px;
    padding: 10px 0 0;
    background: var(--paper);
  }

  .field-log-form.modal-edit .pack-actions .btn-primary,
  .field-log-form.modal-edit .pack-actions .btn-clear {
    flex: 1 1 0;
    min-height: 42px;
  }

  .field-log-form.modal-edit input,
  .field-log-form.modal-edit select,
  .field-log-form.modal-edit textarea {
    min-width: 0;
  }

  .field-log-form.modal-edit textarea {
    min-height: 120px;
  }

  .field-location-actions,
  .field-db-picker-actions,
  .gpx-import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .field-location-actions .btn-clear,
  .field-db-picker-actions .btn-clear,
  .field-db-picker-actions .btn-primary,
  .gpx-import-actions .btn-clear,
  .gpx-import-actions .btn-primary {
    flex: 1 1 auto;
    min-height: 38px;
  }
}

body[data-theme="modern"] .field-log-form.modal-edit {
  background: rgba(15, 25, 27, 0.98);
  color: #eaf8f5;
}


/* Mobile Field Log polish */
@media (max-width: 768px) {
  body.field-log-form-open {
    overflow: hidden;
  }

  .field-log-form.modal-edit,
  .field-log-form.modal-edit * {
    box-sizing: border-box;
  }

  .field-log-form.modal-edit {
    max-width: 100%;
    overflow-x: hidden;
  }

  .field-log-form.modal-edit .field-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .field-log-form.modal-edit input,
  .field-log-form.modal-edit select,
  .field-log-form.modal-edit textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .field-log-form.modal-edit .field-location-box,
  .field-log-form.modal-edit .field-photo-uploader,
  .field-log-form.modal-edit .gpx-importer,
  .field-log-form.modal-edit .external-link-panel,
  .field-log-form.modal-edit .field-public-control,
  .field-log-form.modal-edit .field-db-picker {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .field-log-form.modal-edit .field-map-picker {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .field-log-form.modal-edit .field-map-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .field-log-form.modal-edit #field-location-map {
    width: 100%;
    min-height: 260px;
  }

  .field-log-form.modal-edit .field-photo-preview {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .field-photo-manager {
    inset: 12px;
    padding: 12px;
  }

  .field-photo-manager-body .field-photo-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .field-photo-manager-body .diary-photo-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .field-photo-preview-home {
    max-height: 136px;
  }

  body.field-log-form-open {
    overflow: hidden;
  }

  .field-log-form.modal-edit,
  .field-log-form.modal-edit.active {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .field-log-form.modal-edit .mobile-field-log-head {
    position: sticky;
    top: 0;
    z-index: 12;
    background: var(--paper);
  }

  .field-log-form.modal-edit .field-grid {
    display: grid;
    overflow: visible;
    padding-bottom: 18px;
  }

  .field-log-form.modal-edit .pack-actions {
    position: sticky;
    bottom: 0;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
    background: var(--paper);
  }

  .field-location-actions,
  .field-db-picker-actions,
  .gpx-import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .field-location-actions .btn-clear,
  .field-db-picker-actions .btn-clear,
  .field-db-picker-actions .btn-primary,
  .gpx-import-actions .btn-clear,
  .gpx-import-actions .btn-primary {
    flex: 1 1 auto;
    min-height: 38px;
  }

  .mobile-section-cards {
    box-shadow: inset -22px 0 18px rgba(15, 23, 42, 0.16);
  }

  .mobile-section-cards::after {
    content: '›';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    color: rgba(226, 232, 240, 0.7);
    font-size: 22px;
    font-weight: 900;
  }

  body[data-current-tab="diary"] .mobile-record-cards .mobile-section-card[onclick*="diary"],
  body[data-current-tab="field-logs"] .mobile-record-cards .mobile-section-card[onclick*="field-logs"],
  body[data-current-tab="trips"] .mobile-record-cards .mobile-section-card[onclick*="trips"],
  body[data-current-tab="packs"] .mobile-prepare-cards .mobile-section-card[onclick*="packs"],
  body[data-current-tab="packing"] .mobile-prepare-cards .mobile-section-card[onclick*="packing"],
  body[data-current-tab="my-gear"] .mobile-prepare-cards .mobile-section-card[onclick*="my-gear"],
  body[data-current-tab="gears"] .mobile-prepare-cards .mobile-section-card[onclick*="gears"],
  body[data-current-tab="mountains"] .mobile-discover-cards .mobile-section-card[onclick*="mountains"],
  body[data-current-tab="campgrounds"] .mobile-discover-cards .mobile-section-card[onclick*="campgrounds"],
  body[data-current-tab="search"] .mobile-discover-cards .mobile-section-card[onclick*="search"],
  body[data-current-tab="explore"][data-explore-mode="field_log"] .mobile-community-cards .mobile-section-card[data-explore-mode-card="field_log"],
  body[data-current-tab="explore"][data-explore-mode="diary"] .mobile-community-cards .mobile-section-card[data-explore-mode-card="diary"],
  body[data-current-tab="explore"][data-explore-mode="pack"] .mobile-community-cards .mobile-section-card[data-explore-mode-card="pack"],
  body[data-current-tab="explore"][data-explore-mode="my_gear"] .mobile-community-cards .mobile-section-card[data-explore-mode-card="my_gear"],
  .mobile-section-card.active {
    outline: 2px solid color-mix(in srgb, var(--olive) 72%, white);
    outline-offset: -3px;
    filter: brightness(1.08);
    box-shadow: 0 8px 18px rgba(47, 55, 36, 0.22);
  }

  body[data-theme="notebook"] .mobile-section-cards::after,
  body[data-theme="americana"] .mobile-section-cards::after,
  body[data-theme="nordic"] .mobile-section-cards::after {
    color: rgba(77, 59, 44, 0.46);
  }
}


/* Field Log mobile labeled controls */
.field-mobile-labeled-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-mobile-labeled-control > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.field-mobile-labeled-control select {
  width: 100%;
}\n\n
/* Field Log filter date labels */
.field-filter-date-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.field-filter-date-control > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.field-filter-date-control input {
  width: 100%;
  min-width: 0;
}
\n\n


/* Field Log date range */
.field-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

#field-log-form .field-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: end;
  width: 100%;
  grid-column: 1 / -1;
}

#field-log-form .field-date-range .field-mobile-labeled-control {
  min-width: 0;
}

#field-log-form .field-date-range input {
  width: 100%;
  min-width: 0;
}

@media (max-width: 768px) {
  .field-map-picker {
    inset: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    border-radius: 12px;
    padding: 10px;
  }
  .field-map-modal-head {
    align-items: center;
  }
  .field-map-search {
    grid-template-columns: minmax(0, 1fr);
  }
  .field-map-shell {
    min-height: 58vh;
  }
  .field-date-range {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* Mobile Home Information card */
.home-mobile-info-action {
  display: none;
}

@media (max-width: 760px) {
  .home-mobile-info-action {
    display: flex;
  }

  .home-mobile-info-action .home-action-icon {
    color: #a34f22;
  }
}

/* Mobile AI usage visibility */
@media (max-width: 760px) {
  .auth-area .header-rank-chip {
    display: inline-flex;
    align-items: center;
  }

  .auth-area .header-rank-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }

  .auth-area .header-rank-name,
  .auth-area .header-rank-points {
    display: none;
  }

  .auth-area .header-rank-ai {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(163, 79, 34, 0.12);
    color: #8a3f18;
  }
}

/* Mobile header compact mode */
@media (max-width: 760px) {
  .auth-area .header-rank-chip {
    display: inline-flex !important;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 3px;
    border-radius: 999px;
  }

  .auth-area .header-rank-chip img {
    width: 24px;
    height: 24px;
  }

  .auth-area .header-rank-copy {
    display: none;
  }

  .header-info-chip {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    overflow: hidden;
  }

  .header-info-chip::before {
    font-size: 14px;
    margin: 0;
  }

  .header-info-chip.active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Mobile Home status card */
.home-mobile-status-card {
  display: none;
}

@media (max-width: 760px) {
  .plb-activity-modal {
    place-items: center;
    align-items: center;
    padding: 18px;
  }

  .plb-activity-dialog {
    width: min(92vw, 430px);
    height: auto;
    max-height: min(82dvh, 620px);
    overflow: visible;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(20, 18, 15, 0.34);
  }

  .plb-activity-content {
    padding: 20px 14px 24px;
  }

  .plb-activity-head h2 {
    font-size: 22px;
  }

  .plb-activity-grid {
    gap: 8px;
  }

  .plb-activity-stat {
    padding: 11px 10px;
  }

  .plb-activity-stat strong {
    font-size: 16px;
  }

  .home-mobile-status-card.active {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--line) 74%, var(--olive) 26%);
    border-radius: 18px;
    background: color-mix(in srgb, var(--paper) 86%, var(--soft) 14%);
    box-shadow: 0 10px 26px rgba(31, 26, 20, 0.10);
  }

  .home-mobile-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .home-mobile-status-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
  }

  .home-mobile-status-title {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.15;
    font-weight: 900;
    margin-top: 2px;
  }

  .home-mobile-rank-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: contain;
  }

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

  .home-mobile-status-item {
    min-width: 0;
    padding: 11px 10px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--soft) 74%, var(--paper) 26%);
  }

  .home-mobile-status-k {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 4px;
  }

  .home-mobile-status-item strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-mobile-status-item small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    margin-top: 3px;
  }

  .home-mobile-status-info {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--line) 70%, #f0b35f 30%);
    border-radius: 14px;
    padding: 9px 10px;
    background: color-mix(in srgb, var(--paper) 72%, #fff7ed 28%);
    color: var(--ink);
    font-weight: 900;
    text-align: left;
  }

  .home-mobile-status-info small {
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Tablet main nav horizontal scroll */
@media (min-width: 761px) and (max-width: 1180px) {
  .tab-stack {
    overflow: visible;
  }

  .tab-main-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }

  .tab-main-nav .action-tab {
    flex: 0 0 auto;
    min-width: 118px;
    scroll-snap-align: start;
  }

  .tab-main-nav::after {
    content: "";
    flex: 0 0 10px;
  }
}

/* iPad mini / tablet main nav horizontal scroll override */
@media (min-width: 600px) and (max-width: 1180px) {
  #mobile-nav-stack {
    max-width: 100%;
    overflow: hidden;
  }

  #mobile-menu-toggle {
    display: none !important;
  }

  #main-nav.tab-main-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }

  #main-nav .action-tab {
    flex: 0 0 auto !important;
    min-width: 118px;
    scroll-snap-align: start;
  }

  #main-nav::after {
    content: "";
    flex: 0 0 12px;
  }
}

/* Tablet main nav scroll hint */
@media (min-width: 600px) and (max-width: 1180px) {
  .tab-stack {
    position: relative;
  }

  .tab-stack::after {
    content: "›";
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(
      90deg,
      rgba(255,255,255,0),
      var(--paper) 45%,
      var(--paper) 100%
    );
    color: var(--muted);
    font-size: 22px;
    font-weight: 900;
    pointer-events: none;
    z-index: 3;
  }

  #main-nav.tab-main-nav {
    padding-right: 34px;
  }
}

/* Mobile Diary photo add button restore */
@media (max-width: 760px) {
  .diary-compose.modal-edit .photo-drop-hint {
    order: 5;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 132px;
    width: 100%;
    margin: 0;
    padding: 14px;
  }

  .diary-compose.modal-edit .photo-drop-hint span {
    display: none;
  }

  .diary-compose.modal-edit .photo-drop-button {
    width: 100%;
    min-height: 56px;
    justify-content: center;
    border: 1px dashed color-mix(in srgb, var(--line) 72%, var(--olive) 28%);
    border-radius: 14px;
    background: color-mix(in srgb, var(--paper) 82%, var(--soft) 18%);
    font-weight: 900;
  }
}

/* Mobile Diary location dialog stability */
@media (max-width: 760px) {
  body.diary-compose-open,
  body.diary-location-dialog-open {
    overflow-x: hidden;
  }

  body.diary-location-dialog-open {
    overflow: hidden;
    touch-action: pan-y;
  }

  .diary-location-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    place-items: stretch;
    overflow: hidden;
  }

  .diary-location-dialog-card {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-width: 0;
    border: 0;
    border-radius: 0;
    padding: calc(12px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .diary-location-dialog-card > *,
  .diary-map-picker,
  .diary-map-search,
  .diary-location-choice-grid,
  .diary-map-shell {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .diary-map-search,
  .diary-location-choice-grid {
    grid-template-columns: 1fr;
  }

  .diary-map-shell {
    width: 100%;
    height: min(44dvh, 360px);
    min-height: 240px;
    overflow: hidden;
  }
}

/* Feedback Box */
.feedback-card {
  max-width: 940px;
  margin: 0 auto 18px;
}

.feedback-form {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.feedback-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  padding: 10px 12px;
  font-family: inherit;
  background: var(--field-bg);
  color: var(--ink);
  outline: none;
}

.feedback-form textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

.feedback-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
}

.feedback-screenshot-box {
  display: grid;
  gap: 10px;
  border: 1px dashed color-mix(in srgb, var(--line) 72%, var(--olive) 28%);
  border-radius: 16px;
  padding: 12px;
  background: color-mix(in srgb, var(--paper) 82%, var(--soft) 18%);
}

.feedback-screenshot-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.feedback-screenshot-head strong {
  display: block;
  color: var(--ink);
}

.feedback-screenshot-head small,
#feedback-screenshot-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.feedback-shot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feedback-empty-shot {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.feedback-shot {
  width: 118px;
  display: grid;
  gap: 6px;
}

.feedback-shot img {
  width: 118px;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--paper);
}

.feedback-shot button {
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

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

.feedback-history {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.feedback-report-list {
  display: grid;
  gap: 8px;
}

.feedback-report-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px;
  background: var(--paper);
}

.feedback-report-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.feedback-report-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-top: 3px;
}

.feedback-status-pill {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--olive) 30%);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--olive);
  background: color-mix(in srgb, var(--paper) 75%, var(--soft) 25%);
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .feedback-card {
    margin-bottom: 96px;
  }

  .feedback-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .feedback-actions button {
    width: 100%;
  }
}

/* Admin Feedback Management */
.admin-feedback-card {
  gap: 12px;
}

.admin-feedback-body {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--paper) 22%);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--paper) 84%, var(--soft) 16%);
}

.admin-feedback-shots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-feedback-shot {
  width: 132px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.admin-feedback-shot img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--paper);
}

.admin-feedback-shot.missing {
  border: 1px dashed var(--card-border);
  border-radius: 14px;
  padding: 10px;
}

.admin-feedback-controls {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.admin-feedback-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.admin-feedback-controls select,
.admin-feedback-controls textarea {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--field-bg);
  color: var(--ink);
  font-family: inherit;
}

.admin-feedback-controls textarea {
  min-height: 70px;
  resize: vertical;
}

@media (max-width: 760px) {
  .admin-feedback-controls {
    grid-template-columns: 1fr;
  }

  .admin-feedback-controls button {
    width: 100%;
  }
}

/* Diary lightweight list loading */
.diary-entry-photo-placeholder {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px dashed color-mix(in srgb, var(--line) 72%, var(--olive) 28%);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 78%, var(--soft) 22%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.diary-load-more {
  display: grid;
  place-items: center;
  padding: 12px 0 4px;
}

.diary-load-more button {
  min-width: 180px;
  border-radius: 999px;
}

/* Mobile Diary cancel button restore */
@media (max-width: 760px) {
  .diary-compose.modal-edit .diary-location-button {
    grid-column: 1 / -1;
  }

  .diary-compose.modal-edit .diary-sticky-actions,
  .diary-compose.modal-edit .diary-bottom-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .diary-compose.modal-edit .diary-sticky-actions .diary-save-action,
  .diary-compose.modal-edit .diary-sticky-actions .diary-cancel-edit-button:not([hidden]) {
    width: 100%;
    min-width: 0;
  }
}

/* Diary mobile filter */
.diary-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.diary-filter-open,
.diary-filter-reset {
  flex: 0 0 auto;
  border-radius: 999px;
  font-weight: 900;
}

.diary-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.diary-filter-chip,
.diary-filter-clear-chip {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--line) 74%, var(--olive) 26%);
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--paper) 78%, var(--soft) 22%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.diary-filter-chip.muted {
  color: var(--muted);
}

.diary-filter-clear-chip {
  color: #9a3412;
  background: #fff7ed;
}

.diary-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9400;
  background: rgba(15, 18, 16, 0.42);
}

.diary-filter-sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(72px + env(safe-area-inset-top));
  z-index: 9401;
  display: grid;
  gap: 12px;
  width: auto;
  max-height: calc(100dvh - 90px - env(safe-area-inset-top));
  overflow-y: auto;
  padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: var(--paper);
  box-shadow: 0 18px 60px rgba(0,0,0,0.28);
}

.diary-filter-sheet[hidden],
.diary-filter-backdrop[hidden] {
  display: none;
}

.diary-filter-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
  justify-self: center;
}

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

.diary-filter-grid {
  display: grid;
  gap: 10px;
}

.diary-filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.diary-filter-date-row,
.field-log-filter-date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.diary-filter-grid input,
.diary-filter-grid select {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 11px 12px;
  background: var(--field-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.diary-filter-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 4px;
  background: var(--paper);
}

.diary-filter-actions button {
  min-height: 44px;
  border-radius: 999px;
}

body.diary-filter-open {
  overflow: hidden;
}

@media (min-width: 761px) {
  .diary-filter-sheet {
    left: 50%;
    right: auto;
    top: clamp(92px, 12vh, 132px);
    width: min(620px, calc(100vw - 36px));
    max-height: calc(100dvh - clamp(92px, 12vh, 132px) - 28px);
    border-radius: 22px;
    transform: translateX(-50%);
  }
  .diary-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .diary-filter-date-row,
  .field-log-filter-date-row {
    grid-column: span 2;
  }
}

/* Diary keyword filter */
.diary-filter-grid input[type="search"] {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 11px 12px;
  background: var(--field-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

/* Field Log bottom sheet filter */
.field-log-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.field-log-filter-open,
.field-log-filter-reset {
  flex: 0 0 auto;
  border-radius: 999px;
  font-weight: 900;
}

.field-log-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.field-log-filter-chip,
.field-log-filter-clear-chip {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--line) 74%, var(--olive) 26%);
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--paper) 78%, var(--soft) 22%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.field-log-filter-chip.muted {
  color: var(--muted);
}

.field-log-filter-clear-chip {
  color: #9a3412;
  background: #fff7ed;
}

.field-log-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9400;
  background: rgba(15, 18, 16, 0.42);
}

.field-log-filter-sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(72px + env(safe-area-inset-top));
  z-index: 9401;
  display: grid;
  gap: 12px;
  width: auto;
  max-height: calc(100dvh - 90px - env(safe-area-inset-top));
  overflow-y: auto;
  padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: var(--paper);
  box-shadow: 0 18px 60px rgba(0,0,0,0.28);
}

.field-log-filter-sheet[hidden],
.field-log-filter-backdrop[hidden] {
  display: none;
}

.field-log-filter-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
  justify-self: center;
}

.field-log-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.field-log-filter-grid {
  display: grid;
  gap: 10px;
}

.field-log-filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field-log-filter-grid input,
.field-log-filter-grid select {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 11px 12px;
  background: var(--field-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.field-log-filter-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 4px;
  background: var(--paper);
}

.field-log-filter-actions button {
  min-height: 44px;
  border-radius: 999px;
}

body.field-log-filter-open {
  overflow: hidden;
}

@media (min-width: 761px) {
  .field-log-filter-sheet {
    left: 50%;
    right: auto;
    top: clamp(92px, 12vh, 132px);
    width: min(680px, calc(100vw - 36px));
    max-height: calc(100dvh - clamp(92px, 12vh, 132px) - 28px);
    border-radius: 22px;
    transform: translateX(-50%);
  }
  .field-log-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* My Pack clean functional UI */
.pack-action-primary {
  background: color-mix(in srgb, var(--olive) 88%, #ffffff 12%);
  color: #fff;
  border-color: color-mix(in srgb, var(--olive) 70%, #000 30%);
  font-weight: 900;
}

.pack-item-actions-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.pack-item-category-soft {
  opacity: 0.82;
}

.pack-gear-list .pack-item-top {
  grid-template-columns: 24px 32px minmax(0, 1fr) max-content auto;
  grid-template-areas:
    "handle check category weight actions"
    "handle check main weight actions";
  align-items: center;
  gap: 4px 10px;
}

.pack-gear-list .pack-drag-handle { grid-area: handle; }
.pack-gear-list .pack-check { grid-area: check; }
.pack-gear-list .pack-item-category { grid-area: category; min-width: 0; }
.pack-gear-list .pack-item-main { grid-area: main; min-width: 0; }

.pack-gear-list .pack-item-name {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pack-gear-list .pack-item-brand {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pack-gear-list .pack-item-weight {
  grid-area: weight;
  font-weight: 900;
  white-space: nowrap;
}

.pack-gear-list .pack-item-right {
  grid-area: actions;
  justify-self: end;
}

.packing-pack-list .pack-item-top {
  grid-template-columns: 24px 32px minmax(0, 1fr) max-content;
  grid-template-areas:
    "handle check category actions"
    "handle check main actions";
  align-items: center;
  gap: 4px 10px;
}

.packing-pack-list .pack-drag-handle { grid-area: handle; }
.packing-pack-list .pack-check { grid-area: check; }
.packing-pack-list .pack-item-category { grid-area: category; min-width: 0; }
.packing-pack-list .pack-item-main { grid-area: main; min-width: 0; }

.packing-pack-list .pack-item-name {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.packing-pack-list .pack-item-brand {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.packing-pack-list .pack-item-right {
  grid-area: actions;
  justify-self: end;
}

.packing-pack-list .pack-item-weight {
  font-weight: 900;
  white-space: nowrap;
}

.pack-item-detail .pack-item-specs-in-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 0;
}

@media (max-width: 760px) {
  .pack-gear-list .pack-item-top {
    grid-template-columns: 22px 28px minmax(0, 1fr) auto;
    grid-template-areas:
      "handle check category weight"
      "handle check main weight"
      "actions actions actions actions";
    gap: 6px 9px;
  }

  .pack-item-actions-compact {
    width: 100%;
    justify-content: flex-end;
  }

  .pack-gear-list .pack-item-right {
    justify-self: stretch;
  }

  .packing-pack-list .pack-item-top {
    grid-template-columns: 22px 28px minmax(0, 1fr) auto;
    grid-template-areas:
      "handle check category actions"
      "handle check main actions";
    gap: 6px 9px;
  }

  .packing-pack-list .pack-item-right {
    min-width: 78px;
  }
}

/* PC left-to-right Pack open UI */
.pack-cloud-item.active-open-pack {
  border-width: 2px;
  border-color: color-mix(in srgb, var(--olive) 72%, #ffffff 28%);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--olive) 11%, transparent), transparent 42%),
    color-mix(in srgb, var(--paper) 88%, var(--soft) 12%);
  box-shadow: 0 12px 30px rgba(93,79,56,0.18);
}

.pack-cloud-item.active-open-pack::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: var(--olive);
}

.pack-open-chip {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--olive) 86%, #fff 14%);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.pack-cloud-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: stretch;
}

.pack-cloud-actions .btn-mini,
.pack-cloud-actions .pack-public-toggle {
  width: 100%;
  justify-content: center;
  min-height: 34px;
}

.pack-open-button {
  grid-column: 1 / -1;
  min-height: 38px !important;
  font-weight: 900;
}

.pack-open-button.active {
  background: color-mix(in srgb, var(--olive) 86%, #ffffff 14%);
  color: #fff;
  border-color: color-mix(in srgb, var(--olive) 70%, #000 30%);
}

.pack-cloud-actions .danger {
  color: #9a3412;
}

/* My Pack empty detail state */
.pack-detail-empty-state {
  display: none;
  min-height: 360px;
  place-content: center;
  text-align: center;
  padding: 48px 22px;
  color: var(--muted);
}

.pack-detail-empty-state h2 {
  margin: 8px 0 8px;
  color: var(--olive);
  font-size: clamp(24px, 3vw, 34px);
}

.pack-empty-title-mobile { display: none; }

.pack-detail-empty-state p {
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 800;
}

.pack-detail-panel.pack-detail-empty > :not(.pack-detail-empty-state) {
  display: none !important;
}

.pack-detail-panel.pack-detail-empty .pack-detail-empty-state {
  display: grid;
}

/* My Pack collapsed action menu */
.pack-primary-actions-clean {
  align-items: flex-start;
}

.pack-action-menu {
  position: relative;
  min-width: 160px;
}

.pack-action-menu summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.pack-action-menu summary::-webkit-details-marker {
  display: none;
}

.pack-action-menu summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 12px;
}

.pack-action-menu[open] summary::after {
  content: "▴";
}

.pack-action-menu-body {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: grid;
  gap: 6px;
  min-width: 196px;
  padding: 9px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(93,79,56,0.22);
}

.pack-action-menu.floating .pack-action-menu-body {
  position: fixed;
  right: auto;
  top: auto;
  bottom: auto;
  z-index: 12000;
  width: max-content;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

.pack-action-menu-body .btn-pack {
  width: 100%;
  justify-content: center;
  min-height: 42px;
  font-size: 14px;
  line-height: 1.35;
  padding: 9px 12px;
}

@media (max-width: 760px) {
  .pack-empty-title-desktop { display: none; }
  .pack-empty-title-mobile { display: inline; }

  .pack-action-menu {
    width: 100%;
  }

  .pack-action-menu-body {
    position: static;
    margin-top: 8px;
    box-shadow: none;
  }
}

/* My Pack list collapsed actions */
.pack-cloud-actions-clean {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 6px;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  justify-self: stretch;
}

.pack-cloud-actions-clean .pack-open-button {
  grid-column: auto;
  min-height: 40px !important;
  padding-left: 8px;
  padding-right: 8px;
  line-height: 1.25;
  white-space: normal;
}

.pack-cloud-more-menu {
  position: relative;
  min-width: 0;
  width: 48px;
}

.pack-cloud-more-menu summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 8px 0;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.pack-cloud-more-menu summary::-webkit-details-marker {
  display: none;
}

.pack-cloud-more-menu summary::after {
  content: "⋯";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.pack-cloud-more-menu[open] summary::after {
  content: "⋯";
}

.pack-cloud-more-body {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 12000;
  display: grid;
  gap: 6px;
  min-width: 180px;
  width: max-content;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 9px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 24px 64px rgba(34,31,24,0.32);
}

.pack-cloud-more-menu.floating .pack-cloud-more-body {
  position: fixed;
  right: auto;
  top: auto;
}

.pack-cloud-more-body .btn-mini {
  width: 100%;
  justify-content: center;
  min-height: 40px;
  font-size: 14px;
  line-height: 1.35;
  padding: 8px 12px;
}

.pack-cloud-more-body .danger {
  color: #9a3412;
}

/* My Pack list height and filter */
.pack-panel-actions-library {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  min-width: 0;
  width: 100%;
  align-items: stretch;
}

.pack-library-filter {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--card-border);
  border-radius: var(--control-radius);
  background: var(--field-bg);
  color: var(--ink);
  font-family: inherit;
  font-weight: 900;
  padding: 8px 10px;
}

@media (min-width: 761px) {
  .packs-workspace {
    align-items: start;
  }

  .pack-library-panel {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  body[data-theme="notebook"] .pack-library-panel {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .pack-library-drawer[open] {
    display: block;
    min-height: 0;
    height: auto;
  }

  .pack-library-drawer[open] > summary {
    display: block;
  }

  .pack-library-list {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
}

/* My Pack library header polish */
.pack-library-drawer summary .pack-panel-header {
  flex-wrap: wrap;
  min-width: 0;
}

.pack-library-drawer summary .drawer-title {
  flex: 1 1 100%;
}

.pack-library-drawer summary .drawer-title h2 {
  white-space: nowrap;
}

.pack-filter-clear {
  min-width: 54px;
}

@media (max-width: 420px) {
  .pack-panel-actions-library {
    grid-template-columns: minmax(0, 1fr) 1fr;
  }

  .pack-panel-actions-library .pack-library-filter {
    grid-column: 1 / -1;
  }

  .pack-panel-actions-library .btn-pack {
    width: 100%;
    min-width: 0;
  }
}

/* Mobile Pack check summary */
.pack-check-modal-stats {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}

.pack-check-modal-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pack-check-modal-stat {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 88%, var(--soft) 12%);
  padding: 10px;
  text-align: center;
}

.pack-check-modal-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pack-check-modal-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.pack-check-modal-stat small {
  margin-left: 2px;
  font-size: 11px;
}

.pack-check-modal-category-list {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 90%, var(--soft) 10%);
  overflow: hidden;
}

.pack-check-modal-section-label {
  padding: 9px 11px;
  border-bottom: 1px solid rgba(93,79,56,0.12);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pack-check-modal-category-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(93,79,56,0.1);
  font-size: 12px;
}

.pack-check-modal-category-row:last-child {
  border-bottom: none;
}
[data-lightbox-src] {
  cursor: zoom-in;
}


/* Diary viewer polish: keep the notebook feel while improving mobile readability. */
.diary-memory-photo-grid {
  margin-bottom: 4px;
}

.diary-mobile-body-label {
  margin-bottom: 3px;
}

.diary-memory-text,
.public-diary-viewer-text {
  line-height: 1.86;
}

.diary-memory-card-photo-button {
  background: rgba(38, 42, 29, 0.78);
  box-shadow: 0 2px 10px rgba(20, 16, 10, 0.18);
}

.diary-memory-photo-tile.selected-card-photo .diary-memory-card-photo-button {
  background: color-mix(in srgb, var(--olive) 86%, #2f2717 14%);
}

.external-link-button {
  gap: 5px;
  color: color-mix(in srgb, var(--forest) 82%, #1d4f63 18%);
  border-color: color-mix(in srgb, var(--olive) 30%, var(--card-border));
  background: color-mix(in srgb, var(--control-bg) 88%, #dfe8ea 12%);
  text-decoration: none;
}

.external-link-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.public-diary-card-actions {
  align-items: stretch;
}

.public-diary-secondary-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  opacity: 0.86;
}

.public-diary-secondary-actions .btn-mini,
.public-diary-secondary-actions .follow-btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.public-diary-viewer-actions {
  gap: 10px;
}

.public-diary-primary-actions .public-engagement {
  margin-top: 0;
}

.public-diary-viewer-actions .public-diary-secondary-actions {
  padding-top: 2px;
}

@media (max-width: 640px) {
  .diary-memory-photo-grid {
    margin-bottom: 8px;
  }

  .diary-mobile-body-label {
    margin-top: 4px;
    margin-bottom: 7px;
  }

  .diary-memory-text,
  .public-diary-viewer-text {
    line-height: 1.92;
  }

  .diary-mobile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .diary-mobile-actions .btn-mini,
  .diary-mobile-actions .diary-mobile-map-action,
  .diary-mobile-actions .diary-mobile-icon-action {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding-inline: 5px;
  }

  .diary-mobile-actions .btn-mini small {
    display: block;
    color: inherit;
    font-size: clamp(9px, 2.8vw, 11px);
    font-weight: 900;
    line-height: 1.12;
  }

  .diary-mobile-actions .diary-mobile-delete-action {
    color: #8f321f;
    border-color: rgba(143, 50, 31, 0.34);
    background: color-mix(in srgb, var(--control-bg) 84%, #b4573f 16%);
  }

  .public-diary-card-actions {
    gap: 7px;
  }

  .public-diary-card-actions .public-engagement {
    order: 1;
  }

  .public-diary-card-actions .public-diary-secondary-actions {
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    opacity: 0.78;
  }

  .public-diary-card-actions .public-diary-secondary-actions .btn-mini {
    width: 100%;
    justify-content: center;
    min-height: 36px;
  }

  .public-diary-viewer-actions .public-diary-primary-actions .public-engagement {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 7px;
  }

  .public-diary-viewer-actions .public-diary-secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    opacity: 0.78;
  }
}

/* Field Log desktop column roles: left = experience, right = data. */
@media (min-width: 769px) {
  #field-log-form .field-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  #field-log-experience-section {
    grid-column: 1 / 2;
  }

  #field-log-data-section {
    grid-column: 2 / 3;
  }

  #field-log-form .field-log-section-body {
    grid-template-columns: minmax(0, 1fr);
  }

  #field-log-form .field-date-range,
  #field-log-form .time-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #field-log-experience-section,
  #field-log-data-section {
    grid-column: 1 / -1;
  }
}
