:root {
  --jp-pc-menu-title-size: 17px;
  --jp-pc-menu-label-size: 15px;
  --jp-menu-edge: max(6px, env(safe-area-inset-left));
  --jp-menu-duration: 220ms;
  --jp-menu-ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
  scrollbar-gutter: stable both-edges;
  --jn-bg: #fbf5f1;
  --jn-surface: #fff;
  --jn-soft: #fdf2ec;
  --jn-line: #ecdcd3;
  --jn-ink: #2a1a14;
  --jn-muted: #6b5247;
  --jn-brand: #c2410c;
  --jn-on-brand: #fff;
  --jn-danger: #b42318;
  --jn-field-line: #8c7468;
  --jn-focus: #c2410c;
  --jn-ink-2: #4a352c;
  --jn-surface-2: #fdf7f3;
  --jn-line-soft: #f2e7e0;
  --jn-pill-bg: #ffe2d6;
  --jn-pill-ink: #7a2e0a;
  --jn-hover: #f6eae3;
  --jn-ok: #15803d;
  --jn-ok-bg: #dcfce7;
  --jn-info: #0369a1;
  --jn-info-bg: #e0f2fe;
  --jn-mid: #475467;
  --jn-mid-bg: #eef1f4;
  --jn-bad: var(--jn-danger);
  --jn-bad-bg: #fee4e2;
  --jn-repair-warn: #b45309;
  --jn-repair-warn-bg: #fef3c7;
  --jn-warn: #855400;
  --jn-warn-bg: #fff2d6;
  --jn-new: #8a4b00;
  --jn-new-bg: #fff1d6;
  --jn-new-line: #e8a33d;
  --jn-tab-alert: #d93025;
  --jn-on-alert: #fff;
  --jn-notice-line: #f59e0b;
  --jn-negative: #c5221f;
  --jn-settled: #1f7a45;
  --jn-movein: #6f5300;
  --jn-movein-bg: #fff2a8;
  --jn-movein-line: #e2b500;
  --jn-accent: var(--jn-brand);
  --jn-accent-grad: var(--jn-brand);
  --jn-marker-bg: #0f766e;
  --jn-marker-line: #0b5d56;
  --jn-marker-ink: #fff;
  --jn-kakao: #fee500;
  --jn-naver: #03c75a;
  --jn-provider-ink: #191919;
  --jn-font: system-ui, "Malgun Gothic", sans-serif;
  --jn-title: 24px;
  --jn-subtitle: 18px;
  --jn-body: 16px;
  --jn-label: 16px;
  --jn-small: 14px;
  --jn-badge: 13px;
  --jn-number: 20px;
  --jn-heading-line: 1.3;
  --jn-body-line: 1.6;
  --jn-page-gutter: 16px;
  --jn-section-gap: 16px;
  --jn-card-gap: 12px;
  --jn-form-gap: 12px;
  --jn-inner-gap: 8px;
  --jn-header-height: 56px;
  --jn-header-width: 1130px;
  --jn-public-width: 640px;
  --jn-control-line: var(--jn-field-line);
  --jn-info-line: #7dd3fc;
  --jn-ring-outer: #111318;
  --jn-ring-inner: #fff;
  --jn-card-radius: 18px;
  --jn-card-padding: 16px;
  --jn-control-radius: 12px;
  --jn-primary-height: 48px;
  --jn-touch-height: 44px;
  --jn-primary-font: 700 15px/var(--jn-heading-line) var(--jn-font);
  --jn-secondary-font: 650 14px/var(--jn-heading-line) var(--jn-font);
  --jp-brand: var(--jn-brand);
  --jp-surface: var(--jn-surface);
  --jp-ink: var(--jn-ink);
  --jp-card-label: var(--jn-muted);
  --jp-line: var(--jn-line);
  --jp-button: var(--jn-brand);
  --jp-button-ink: var(--jn-on-brand);
  --jp-card-radius: var(--jn-card-radius);
  --jp-card-padding: var(--jn-card-padding);
  --jp-card-value-weight: 700;
  --jp-button-radius: var(--jn-control-radius);
  --jp-pill: 999px;
  --jp-primary-height: var(--jn-primary-height);
  --jp-secondary-height: var(--jn-touch-height);
  --jp-done-bg: var(--jn-ok-bg);
  --jp-done-ink: var(--jn-ok);
  --jp-progress-bg: var(--jn-warn-bg);
  --jp-progress-ink: var(--jn-warn);
  --jp-placeholder: var(--jn-muted);
  --jp-field-line: var(--jn-field-line);
  --jp-focus-strong: var(--jn-ink);
}

:root.theme-dark {
  --jn-focus: #fb923c;
  color-scheme: dark;
  --jn-bg: #111318;
  --jn-surface: #1b1f27;
  --jn-soft: #22262f;
  --jn-line: #2a2f3a;
  --jn-control-line: #737e92;
  --jn-info-line: #60a5fa;
  --jn-ink: #e8eaf0;
  --jn-muted: #9aa3b5;
  --jn-brand: #fb923c;
  --jn-on-brand: #111318;
  --jn-danger: #fca5a5;
  --jn-field-line: #737e92;
  --jn-ink-2: #c9ceda;
  --jn-surface-2: var(--jn-soft);
  --jn-line-soft: #242833;
  --jn-pill-bg: #3a2414;
  --jn-pill-ink: #fdba74;
  --jn-hover: #232833;
  --jn-ok: #6ee7a0;
  --jn-ok-bg: #12321f;
  --jn-info: #93c5fd;
  --jn-info-bg: #172554;
  --jn-mid: #c9ceda;
  --jn-mid-bg: #262b35;
  --jn-bad-bg: #3a1616;
  --jn-repair-warn: #fbbf24;
  --jn-repair-warn-bg: #3a2a0c;
  --jn-warn: #f7cf8c;
  --jn-warn-bg: #483921;
  --jn-new: #ffc773;
  --jn-new-bg: #4a3410;
  --jn-negative: #ff8a80;
  --jn-settled: #7fdca4;
  --jn-movein: #ffe28a;
  --jn-movein-bg: #3f3510;
  --jn-movein-line: #c9a227;
}

:focus-visible {
  outline: 2px solid var(--jn-focus);
  outline-offset: 3px;
}
#main-content:focus { outline: none; }

/* 154(3번PC): 예전 .portal a 색이 이기지 않게 a.jp-skip-link도 함께 잡는다 */
.jp-skip-link,
a.jp-skip-link {
  position: fixed;
  z-index: 2147483647;
  inset: 8px auto auto 16px;
  display: inline-flex;
  align-items: center;
  min-height: var(--jn-touch-height);
  padding-inline: 12px;
  border-radius: var(--jn-control-radius);
  background: var(--jn-surface);
  color: var(--jn-ink);
  clip-path: inset(50%);
}
.jp-skip-link:focus { clip-path: none; }

.jp-header {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  box-sizing: border-box;
  width: min(100%, calc(var(--jn-header-width) + 2 * var(--jn-page-gutter)));
  margin-inline: auto;
  min-block-size: var(--jn-header-height);
  padding: 4px var(--jn-page-gutter);
  gap: 4px 8px;
  border: 0;
  background: transparent;
}

.jp-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.jp-heading-actions a { display: inline-flex; align-items: center; min-height: var(--jn-touch-height); }
.jp-header.jp-header .jp-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-block-size: var(--jn-touch-height);
  margin: 0;
  color: inherit;
  font: 800 16px/var(--jn-heading-line) var(--jn-font);
  text-decoration: none;
  white-space: nowrap;
}

.jp-brand-mark {
  display: inline-grid;
  place-items: center;
  background: var(--jn-brand);
  color: var(--jn-on-brand);
  font: 700 18px/1 var(--jn-font);
  /* 11-26 디자인팀(3번PC S24+ 앱 글자 최대, 2차): 안드로이드 앱 글자 확대(textZoom)는 그려지는 글자만 키우고 em 계산은 그대로라
     em 크기 네모가 커지지 않았다(e45fad6f). 네모를 고정하지 않고 실제 글자 + px 여백으로 정해 글자와 함께 커지게 한다.
     보통 크기는 최소 32px 정사각형 그대로. */
  flex: 0 0 auto;
  box-sizing: border-box;
  inline-size: auto;
  min-inline-size: 32px;
  min-block-size: 32px;
  aspect-ratio: 1;
  padding: 4px 6px;
  border-radius: 10px;
  /* 11-26 3번PC S3: 글자 200%에서 마크 글자(32px 칸)가 삐져나와 '집노트'와 겹침 — 마크만 글자 확대를 받지 않는다 */
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

.jp-header.jp-header .jp-theme, .jp-icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 var(--jn-touch-height);
  width: var(--jn-touch-height);
  height: var(--jn-touch-height);
  min-height: var(--jn-touch-height);
  margin: 0;
  padding: 0;
  border: 1px solid var(--jn-control-line);
  border-radius: var(--jn-control-radius);
  background: var(--jn-surface);
  color: var(--jn-ink);
  font: 700 18px/1 var(--jn-font);
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.jp-public { --jn-header-width: var(--jn-public-width); }
.jp-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 0 16px;
  box-sizing: border-box;
  width: min(100%, calc(var(--jn-header-width) + 2 * var(--jn-page-gutter)));
  min-block-size: var(--jn-touch-height);
  margin: var(--jn-section-gap) auto 0;
  padding: 0 var(--jn-page-gutter) env(safe-area-inset-bottom);
  color: var(--jn-muted);
  font: 400 .875rem/1.6 var(--jn-font);
  text-align: center;
  word-break: keep-all;
}
.jp-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--jn-touch-height);
  color: inherit;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.jp-public h1 { font-size: 1.5rem; font-weight: 700; line-height: var(--jn-heading-line); }
.jp-public h2 { font-size: 1.125rem; font-weight: 700; line-height: var(--jn-heading-line); }
.jp-public h3 { font-size: 1rem; font-weight: 700; line-height: var(--jn-heading-line); }

@media (max-width: 1199px) {
  /* 11-26 GPT(디자인팀 E): 판 속성이 없는 휴대폰 연결·약관·방침의 작은 링크와 머리줄 누름 영역을 48px로 확보한다. */
  .jp-public > main a[href="/phone/settings"],
  .jp-public > main#main-content:has(a[href="/account/delete"]) :is(a[href="/account/delete"], a[href^="mailto:"]) {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--jn-primary-height);
    max-inline-size: 100%;
    overflow-wrap: anywhere;
  }
  .jp-public > main:has(a[href="/phone/settings"]) > .jp-footer a,
  .jp-public:has(> main#main-content a[href="/account/delete"]) > .jp-footer a {
    min-block-size: var(--jn-primary-height);
  }
  .jp-public:has(> main a[href="/phone/settings"], > main#main-content a[href="/account/delete"]) > .jp-header :is(.jp-brand, #jp-theme) {
    position: relative;
  }
  .jp-public:has(> main a[href="/phone/settings"], > main#main-content a[href="/account/delete"]) > .jp-header :is(.jp-brand, #jp-theme)::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    inline-size: max(100%, var(--jn-primary-height));
    block-size: var(--jn-primary-height);
    transform: translate(-50%, -50%);
  }
}

.jp-connection, .jp-signin-notice {
  border: 1px solid var(--jn-info-line);
  border-radius: var(--jn-control-radius);
  background: var(--jn-info-bg);
  color: var(--jn-info);
  padding: 8px 12px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.jp-signin-notice a:not([class]) { color: inherit; text-decoration: underline; }
.jp-signin-notice .jp-secondary { margin-block-start: 8px; }

.jp-primary, .jp-secondary, .jp-danger {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--jn-primary-height);
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--jn-control-radius);
  background: var(--jn-brand);
  color: var(--jn-on-brand);
  font: var(--jn-primary-font);
  text-align: center;
  text-decoration: none;
  word-break: keep-all;
  cursor: pointer;
}
.jp-secondary {
  min-height: var(--jn-touch-height);
  border-color: var(--jn-control-line);
  background: var(--jn-surface);
  color: var(--jn-ink);
  font: var(--jn-secondary-font);
}
.jp-danger {
  border-color: var(--jn-danger);
  background: var(--jn-surface);
  color: var(--jn-danger);
}

.jp-public :is(input, textarea, select):not([type="file"]) {
  min-height: var(--jn-primary-height);
  border: 1px solid var(--jn-field-line);
  border-radius: var(--jn-control-radius);
}
.jp-public :is(input, textarea, select):not([type="file"]):focus {
  border-color: var(--jn-brand);
  box-shadow: inset 0 0 0 1px var(--jn-brand);
}
.jp-public :is(input, textarea)::placeholder { color: var(--jn-muted); opacity: 1; }

.jp-empty {
  padding: var(--jn-card-padding);
  border: 1px solid var(--jn-line);
  border-radius: var(--jn-card-radius);
  background: var(--jn-surface);
  color: var(--jn-ink);
  text-align: start;
}
.jp-empty > strong { display: block; font-size: var(--jn-label); font-weight: 600; }
.jp-empty > p { margin: 4px 0 0; color: var(--jn-muted); font-size: var(--jn-small); line-height: var(--jn-body-line); }
.jp-empty > button { margin-top: 8px; }

.jp-confirm {
  box-sizing: border-box;
  width: min(360px, calc(100% - 32px));
  padding: var(--jn-card-padding);
  border: 1px solid var(--jn-line);
  border-radius: var(--jn-card-radius);
  background: var(--jn-surface);
  color: var(--jn-ink);
  box-shadow: 0 18px 48px rgb(0 0 0 / 35%);
}
.jp-confirm::backdrop { background: rgb(10 18 28 / 60%); backdrop-filter: blur(4px); }
.jp-confirm h2 { margin: 0 0 8px; font-size: var(--jn-subtitle); font-weight: 700; line-height: var(--jn-heading-line); }
.jp-confirm p { margin: 0 0 16px; font-size: var(--jn-small); line-height: var(--jn-body-line); word-break: keep-all; }
.jp-confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.jp-confirm-actions button { min-width: 88px; }

.jp-error-page {
  min-height: 100dvh;
  background: var(--jn-bg);
  color: var(--jn-ink);
  font: var(--jn-body)/var(--jn-body-line) var(--jn-font);
}
.jp-error-page main {
  display: grid;
  justify-items: start;
  gap: var(--jn-section-gap);
  width: min(calc(100% - 2 * var(--jn-page-gutter)), var(--jn-public-width));
  margin: var(--jn-section-gap) auto;
  text-align: start;
}
.jp-error-page h1 { margin: 0; overflow-wrap: anywhere; }
.jp-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.jp-primary:focus-visible,
.jp-photo-picker:has(input:focus-visible) {
  outline: 2px solid var(--jn-ring-inner);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--jn-ring-outer);
}


.jp-desktop-menu-toggle {
  display: none;
  flex: none;
  place-items: center;
  inline-size: 44px;
  min-block-size: 44px;
  padding: 0;
  border: 1px solid var(--jn-line);
  border-radius: 12px;
  background: var(--jn-surface);
  color: var(--jn-ink);
  cursor: pointer;
}
.jp-desktop-menu-toggle:hover { background: var(--jn-hover); }
.jp-desktop-menu-toggle:is(:active,.jp-pressed) { background: var(--jn-soft); }
@media (prefers-reduced-motion: reduce) {
  :root { --jp-menu-duration: 0ms; }
}

/* F1(3번PC, 11-26): 폰에서 버튼을 누르는 순간 눌림 표시 */
.jp-public :is(button,a,.pick){-webkit-tap-highlight-color:transparent}
.jp-public :is(.jp-primary,.jp-secondary,.jp-danger,.jp-theme,.pick){transition:filter .08s,transform .08s}
.jp-public :is(.jp-primary,.jp-secondary,.jp-danger,.jp-theme,.pick,.photos button):not(:disabled):is(:active,.jp-pressed){filter:brightness(.9);transform:scale(.98)}
@media (prefers-reduced-motion:reduce){.jp-public *{transition:none!important}}
.jp-public :is(a,summary,button):not(.jp-primary,.jp-secondary,.jp-danger,.jp-theme,.pick):is(:active,.jp-pressed){opacity:.6}
:root.theme-dark .jp-public :is(.jp-secondary,.jp-theme,.pick,.photos button):not(:disabled):is(:active,.jp-pressed){filter:brightness(1.35)}

/* 153. 모든 화면 버튼·링크는 첫 누름부터 두 번 눌러 확대 대기(약 180ms) 없이 반응한다(11-26 3번PC S24+). 끌기·두 손가락 확대는 그대로 */
:is(button,a,select,summary,label,[role=button]){touch-action:manipulation}

/* 154. 11-27 디자인팀 움직임(총괄팀·형님 "넘어갈 때 쓱, 고급스럽게"): transform·opacity만, 150~300ms, 차분한 곡선 하나. 줄이기 설정이면 전부 끔 */
:root {
  --jn-motion-fast: 160ms;
  --jn-motion: 220ms;
  --jn-motion-slow: 280ms;
  --jn-motion-ease: cubic-bezier(.2,0,0,1);
  --jn-motion-exit: cubic-bezier(.4,0,1,1);
  --jn-motion-step: 45ms;
}
@keyframes jn-motion-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes jn-motion-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes jn-motion-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  /* 다른 주소로 넘어갈 때(같은 사이트): 앞 화면은 살짝 올라가며 흐려지고, 새 화면은 아래에서 떠오른다 */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: jn-motion-out var(--jn-motion-fast) var(--jn-motion-exit) both; }
  ::view-transition-new(root) { animation: jn-motion-in var(--jn-motion) var(--jn-motion-ease) both; }
  /* 확인 카드·설정 창: 열 때 아래에서 떠오르고 닫을 때 가라앉는다(서랍·게시판 창·사진 확대는 제 움직임을 씀) */
  dialog:not(.la-mobile-drawer, .sb-dialog, .repair-photo-zoom) {
    opacity: 0;
    transform: translateY(10px) scale(.98);
    transition: opacity var(--jn-motion) var(--jn-motion-ease), transform var(--jn-motion) var(--jn-motion-ease), overlay var(--jn-motion) allow-discrete, display var(--jn-motion) allow-discrete;
  }
  dialog:not(.la-mobile-drawer, .sb-dialog, .repair-photo-zoom)[open] { opacity: 1; transform: none; }
  @starting-style {
    dialog:not(.la-mobile-drawer, .sb-dialog, .repair-photo-zoom)[open] { opacity: 0; transform: translateY(10px) scale(.98); }
  }
  dialog:not(.la-mobile-drawer, .sb-dialog, .repair-photo-zoom)::backdrop {
    opacity: 0;
    transition: opacity var(--jn-motion) var(--jn-motion-ease), overlay var(--jn-motion) allow-discrete, display var(--jn-motion) allow-discrete;
  }
  dialog:not(.la-mobile-drawer, .sb-dialog, .repair-photo-zoom)[open]::backdrop { opacity: 1; }
  @starting-style {
    dialog:not(.la-mobile-drawer, .sb-dialog, .repair-photo-zoom)[open]::backdrop { opacity: 0; }
  }
  /* 서랍·아래 시트는 여는 움직임(hmSlide·sb-in)이 이미 있어, 닫을 때만 왔던 길로 160ms 빠르게 돌아간다 */
  dialog.la-mobile-drawer { transition: transform var(--jn-motion-fast) var(--jn-motion-exit), overlay var(--jn-motion-fast) allow-discrete, display var(--jn-motion-fast) allow-discrete; }
  dialog.la-mobile-drawer:not([open]) { transform: translateX(-100%); }
  dialog.la-mobile-drawer::backdrop { transition: opacity var(--jn-motion-fast) var(--jn-motion-exit), overlay var(--jn-motion-fast) allow-discrete, display var(--jn-motion-fast) allow-discrete; }
  dialog.la-mobile-drawer:not([open])::backdrop { opacity: 0; }
  dialog.sb-dialog { transition: opacity var(--jn-motion-fast) var(--jn-motion-exit), transform var(--jn-motion-fast) var(--jn-motion-exit), overlay var(--jn-motion-fast) allow-discrete, display var(--jn-motion-fast) allow-discrete; }
  dialog.sb-dialog:not([open]) { opacity: 0; transform: translateY(12px); }
  /* 숫자가 바뀌면(key로 새로 그림) 짧게 떠오른다 */
  .jn-num { display: inline-block; animation: jn-motion-in var(--jn-motion) var(--jn-motion-ease) both; }
  .jn-num-in { animation: jn-motion-in var(--jn-motion) var(--jn-motion-ease) both; }
  /* 같은 주소 안에서 화면이 바뀔 때(motion.js가 붙였다 뗌) */
  .jn-view-in { animation: jn-motion-in var(--jn-motion) var(--jn-motion-ease) both; }
}
