/* ===== 토큰 =====
   bg-base   #0A0D14  (거의 검정, 살짝 남색)
   bg-panel  #12161F
   bg-elev   #1A1F2C
   line      #262C3B
   text-hi   #EAEEF5
   text-mid  #9AA3B5
   text-low  #5C6478
   up (매수/상승)  #29E0C9  (시안)
   down(매도/하락) #FF3E7F  (니케 마젠타)
   accent    #FFC857  (골드, 강조/랭킹)

   ===== 비주얼 컨셉: 방주 증권 단말기 =====
   화면 전체를 "방주 안에 설치된 증권 단말기 하드웨어"로 취급합니다.
   숫자는 모노스페이스, 패널은 코너 브래킷으로 프레이밍, 배경엔 옅은 스캔라인.
   --font-mono은 웹폰트를 새로 받지 않고 OS 기본 모노스페이스 스택을 씁니다
   (오프라인/저사양 환경에서도 즉시 렌더링되고 폰트 깜빡임이 없음).
*/
:root {
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, 'Liberation Mono', Menlo, monospace;
  --bracket-line: #2C3E4F;
  --up: #29E0C9;
  --down: #FF3E7F;
}

@font-face { font-family: 'Pretendard'; src: local('Pretendard'); }

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #0A0D14;
  color: #EAEEF5;
  font-family: 'Pretendard', -apple-system, 'Malgun Gothic', sans-serif;
  min-height: 100vh;
}
body {
  position: relative;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(41,224,201,0.07), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(255,62,127,0.06), transparent 42%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.5), transparent 60%);
}
/* 옅은 스캔라인 — 화면이 "웹페이지"가 아니라 "단말기 디스플레이"처럼 보이게 하는
   가장 저비용 고효율 장치. 고정 배치라 스크롤해도 항상 화면에 붙어 있습니다. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px,
    transparent 1px, transparent 3px
  );
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; } /* 스캔라인은 시각 효과일 뿐이라 절전/민감도 설정 시 과감히 뺌 */
}
button { font-family: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* ===== 코너 브래킷 — 주요 패널을 "단말기 화면"처럼 프레이밍 =====
   장식용 ::before/::after만 추가하는 구조라 기존 레이아웃·기능에는 영향 없음. */
.panel, .re-listing-panel, .re-owned-panel, .mp-panel, .mp-owned-panel,
.detail-main-panel, .detail-hero, .portfolio-main-panel, .portfolio-summary-panel,
.quests-panel, .trade-modal, .my-info-modal {
  position: relative;
}
.panel::before, .re-listing-panel::before, .re-owned-panel::before,
.mp-panel::before, .mp-owned-panel::before, .detail-main-panel::before, .detail-hero::before,
.portfolio-main-panel::before, .portfolio-summary-panel::before, .quests-panel::before,
.trade-modal::before, .my-info-modal::before {
  content: ""; position: absolute; top: 0; left: 0; width: 9px; height: 9px;
  border-top: 1.5px solid var(--bracket-line); border-left: 1.5px solid var(--bracket-line);
  pointer-events: none; z-index: 2;
}
.panel::after, .re-listing-panel::after, .re-owned-panel::after,
.mp-panel::after, .mp-owned-panel::after, .detail-main-panel::after, .detail-hero::after,
.portfolio-main-panel::after, .portfolio-summary-panel::after, .quests-panel::after,
.trade-modal::after, .my-info-modal::after {
  content: ""; position: absolute; bottom: 0; right: 0; width: 9px; height: 9px;
  border-bottom: 1.5px solid var(--bracket-line); border-right: 1.5px solid var(--bracket-line);
  pointer-events: none; z-index: 2;
}

/* 등락 숫자에 아주 옅은 글로우 — 발광하는 디스플레이 픽셀 느낌.
   기존 .up/.down 색상 규칙 위에 text-shadow만 얹는 추가 선언이라 안전합니다. */
.ticker-item.up, .s-change.up, .holding-item .h-pl.up, .re-card-change.up, .re-owned-pl.up,
.detail-change.up, .portfolio-total-pl.up, .pf-item-pl.up {
  text-shadow: 0 0 6px rgba(41,224,201,0.35);
}
.ticker-item.down, .s-change.down, .holding-item .h-pl.down, .re-card-change.down, .re-owned-pl.down,
.detail-change.down, .portfolio-total-pl.down, .pf-item-pl.down {
  text-shadow: 0 0 6px rgba(255,62,127,0.3);
}

/* ===== 부팅 시퀀스 (boot.js가 채워 넣는 상단 한 줄) ===== */
.boot-line {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--up);
  padding: 6px 28px; background: #05070C; border-bottom: 1px solid #171B26;
  letter-spacing: 0.03em; opacity: 0.8; white-space: nowrap; overflow: hidden;
}
.boot-line .cursor { display: inline-block; width: 6px; margin-left: 1px; background: var(--up); animation: boot-blink 1s step-end infinite; }
@keyframes boot-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .boot-line .cursor { animation: none; }
}
@media (max-width: 560px) {
  .boot-line { padding: 6px 16px; font-size: 10px; }
}

/* ===== 상단 티커 테이프 ===== */
.ticker-tape {
  overflow: hidden;
  background: #05070C;
  border-bottom: 1px solid #262C3B;
  height: 34px;
  display: flex;
  align-items: center;
}
.ticker-track {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-scroll 200s linear infinite;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.ticker-item {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #9AA3B5;
  display: flex;
  gap: 6px;
  font-variant-numeric: tabular-nums; font-family: var(--font-mono);
}
.ticker-item .t-name { color: #EAEEF5; font-weight: 600; }
.ticker-item.up { color: #29E0C9; }
.ticker-item.down { color: #FF3E7F; }

/* ===== 상단바 ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid #262C3B;
  background: #0A0D14;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FF3E7F, #7A3EFF 60%, #29E0C9);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #05070C;
  font-family: var(--font-mono);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong {
  font-size: 16px; letter-spacing: -0.01em; font-family: var(--font-mono); font-weight: 700;
}
.brand-text span { font-size: 11px; color: #5C6478; letter-spacing: 0.05em; font-family: var(--font-mono); }
/* 접속자 수 배지 — "// LIVE" 단말기 상태 칩처럼. 값(id="onlineCount")은 그대로 두고
   시각만 재단장 — presence.js가 채우는 텍스트("● 12")는 손대지 않았습니다. */
.online-badge {
  margin-left: 6px; padding: 4px 10px 4px 8px; border-radius: 3px;
  background: rgba(41,224,201,0.1); border: 1px solid rgba(41,224,201,0.35);
  color: #29E0C9; font-size: 11px; font-weight: 700; white-space: nowrap;
  font-family: var(--font-mono); letter-spacing: 0.02em;
}

.account {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.account-item { display: flex; flex-direction: column; align-items: flex-end; }
.account-item .label { font-size: 10px; color: #5C6478; letter-spacing: 0.04em; }
.account-item .value { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.account-item .value.nickname { font-weight: 600; color: #9AA3B5; }
.btn-ghost-link {
  align-self: center;
  padding: 7px 14px; border-radius: 8px; border: 1px solid #262C3B;
  color: #B79BFF; text-decoration: none; font-size: 12.5px; font-weight: 700;
  white-space: nowrap; background: transparent; cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn-ghost-link:hover { border-color: #7A3EFF; }
.top-nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid rgba(38,44,59,.95);
}
.top-nav-link,
.nav-group-toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.top-nav-link.is-active,
.nav-group-toggle.is-active,
.nav-group.is-active > .nav-group-toggle,
.nav-group[open] > .nav-group-toggle {
  color: #EAEEF5;
  border-color: rgba(122,62,255,.68);
  background: rgba(122,62,255,.12);
  box-shadow: inset 0 0 0 1px rgba(122,62,255,.14);
}
.nav-group {
  position: relative;
  align-self: center;
}
.nav-group > summary {
  list-style: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group-toggle {
  position: relative;
  padding-right: 26px;
}
.nav-group-toggle::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #7D89A0;
  pointer-events: none;
}
.nav-group[open] > .nav-group-toggle::after {
  color: #CFC5FF;
}
.nav-group-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(43,53,73,.95);
  background: rgba(11,16,24,.98);
  box-shadow: 0 16px 32px rgba(0,0,0,.34);
  z-index: 30;
}
.nav-group-menu .top-nav-link {
  width: 100%;
  justify-content: flex-start;
  min-height: 36px;
}
.quest-nav-link { position: relative; }
.quest-badge {
  position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #FF3E7F; border: 1.5px solid #05070C;
}

/* ===== 긴급속보 배너 ===== */
.breaking-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 28px;
  background: #150A10;
  border-bottom: 1px solid #3A1424;
  transition: background 0.3s;
}
.breaking-banner.flash { background: #2A0A18; animation: flash-pulse 0.6s ease-out 2; }
@keyframes flash-pulse {
  0%, 100% { box-shadow: inset 0 0 0 rgba(255,62,127,0); }
  50% { box-shadow: inset 0 0 40px rgba(255,62,127,0.25); }
}
.breaking-tag {
  flex-shrink: 0;
  background: #FF3E7F; color: #05070C;
  font-size: 11px; font-weight: 800;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.02em;
}
.breaking-text { font-size: 13px; color: #E8B4C4; font-weight: 500; }

/* ===== 레이아웃 ===== */
.layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.85fr;
  gap: 1px;
  background: #262C3B;
  min-height: calc(100vh - 34px - 68px - 40px);
}
.panel { background: #0A0D14; padding: 20px 22px; overflow: hidden; display: flex; flex-direction: column; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
/* 패널 제목 앞에 "// " 접두어 — 단말기 로그처럼. panel-head는 전 페이지 공통 클래스라
   이 한 줄만으로 메인/부동산/명화/퀘스트 페이지 헤더가 전부 같이 바뀝니다. */
.panel-head h2 {
  font-size: 12px; font-weight: 700; margin: 0; letter-spacing: 0.06em;
  color: #7A8699; text-transform: uppercase; font-family: var(--font-mono);
}
.panel-head h2::before { content: "// "; color: var(--up); }
.panel-head .sub { font-size: 10.5px; color: #4A5568; font-family: var(--font-mono); }
.panel-head-link { text-decoration: none; }
.panel-head-link:hover { color: var(--up); }
.ranking-head { margin-top: 22px; }

/* ===== 종목 검색 / 정렬 탭 ===== */
.stock-search { margin-bottom: 10px; }
.stock-search input {
  width: 100%; background: #12161F; border: 1px solid #262C3B; border-radius: 8px;
  padding: 9px 12px; color: #EAEEF5; font-size: 13px;
}
.stock-search input::placeholder { color: #5C6478; }

.sort-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.sort-tab {
  padding: 6px 12px; border-radius: 20px; border: 1px solid #262C3B;
  background: #12161F; color: #9AA3B5; font-size: 12px; font-weight: 600;
}
.sort-tab.active { background: rgba(41,224,201,0.15); border-color: #29E0C9; color: #29E0C9; }

/* ===== 종목 리스트 ===== */
.stock-list-wrap { overflow-y: auto; flex: 1; }
.stock-list { display: flex; flex-direction: column; }
.stock-row {
  cursor: pointer; transition: background 0.15s;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; border-bottom: 1px solid #171B26;
}
.stock-row:hover { background: #12161F; }
.stock-row.event-flash { animation: row-flash 1.1s ease-out; }
@keyframes row-flash {
  0% { background: rgba(255,62,127,0.35); }
  100% { background: transparent; }
}
.stock-row.event-flash.pos { animation-name: row-flash-pos; }
@keyframes row-flash-pos {
  0% { background: rgba(41,224,201,0.30); }
  100% { background: transparent; }
}
.s-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.s-name { font-weight: 700; font-size: 14px; }
.s-sub { font-size: 11px; color: #5C6478; }
.s-reputation { color: #B79BFF; font-weight: 700; }
.s-price-block { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  object-position: center 15%;
  flex-shrink: 0; display: block; background: #171B26;
}
.avatar-fallback {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF3E7F, #7A3EFF 60%, #29E0C9);
  color: #05070C; font-weight: 800; font-size: 12px;
}
.avatar.avatar-md, .avatar-fallback.avatar-md { width: 48px; height: 48px; font-size: 18px; }
.avatar.avatar-lg, .avatar-fallback.avatar-lg { width: 64px; height: 64px; font-size: 26px; }

.s-price { font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.s-change { font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.s-change.up { color: #29E0C9; }
.s-change.down { color: #FF3E7F; }
.s-change.flat { color: #5C6478; }
.spark { display: block; flex-shrink: 0; }

.s-like {
  flex-shrink: 0; width: 30px; height: 30px; border: none; background: none;
  color: #5C6478; font-size: 17px; border-radius: 50%;
}
.s-like:hover { background: rgba(255,62,127,0.1); }
.s-like.liked { color: #FF3E7F; }

/* ===== 뉴스 피드 ===== */
.news-feed { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.news-item {
  padding: 10px 12px;
  background: #12161F;
  border-left: 3px solid #262C3B;
  border-radius: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  animation: news-in 0.3s ease-out;
}
@keyframes news-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.news-item.pos { border-left-color: #29E0C9; }
.news-item.neg { border-left-color: #FF3E7F; }
.news-item.market { border-left-color: #FFC857; }
.news-item.mixed { border-left-color: #B79BFF; }
/* 루머(예고) — 아직 진위가 갈리지 않은 정보. 점선 테두리와 낮은 채도로
   "확정 소식이 아니다"를 시각적으로 알립니다. */
.news-item.rumor {
  border-left-color: #7A8699;
  border-left-style: dashed;
  background: rgba(122,134,153,0.06);
}
.news-item.rumor .n-headline { color: #B8C2D4; font-style: italic; }
.news-item .n-time { color: #5C6478; font-size: 10.5px; margin-right: 6px; font-family: var(--font-mono); }
.news-item .n-headline { color: #EAEEF5; font-weight: 600; }
.news-item .n-body { color: #9AA3B5; display: block; margin-top: 2px; }
/* 헤드라인 속 종목 이름 링크(news-link.js) — 뉴스 보고 바로 상세페이지로 이동 */
.news-stock-link { color: var(--up); text-decoration: underline; text-decoration-color: rgba(41,224,201,0.4); text-underline-offset: 2px; }
.news-stock-link:hover { text-decoration-color: var(--up); }

/* ===== 뉴스 아카이브 페이지 ===== */
.news-filter-chip {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(122,62,255,0.12); border: 1px solid rgba(122,62,255,0.35);
  color: #B79BFF; font-size: 12.5px; font-weight: 600;
}
.news-filter-chip button {
  margin-left: auto; background: none; border: none; color: #B79BFF;
  font-size: 16px; line-height: 1; padding: 0 2px;
}
.news-filter-chip button:hover { color: #EAEEF5; }
#loadMoreBtn { cursor: pointer; }
#loadMoreBtn:hover { border-color: var(--up); color: var(--up); }
#loadMoreBtn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== 포트폴리오 / 랭킹 ===== */
.holdings-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.empty-state { color: #5C6478; font-size: 12px; line-height: 1.6; padding: 14px 0; }
.holding-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 10px; background: #12161F; border-radius: 6px; font-size: 12.5px;
}
.holding-item .h-name { font-weight: 600; }
.holding-item .h-info { display: flex; align-items: center; gap: 8px; }
.holding-item .h-qty { color: #5C6478; font-size: 11px; }
.holding-item .h-pl.up { color: #29E0C9; }
.holding-item .h-pl.down { color: #FF3E7F; }

.ranking-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 4px; position: relative; }
.rank-num { width: 18px; font-weight: 800; color: #5C6478; font-size: 11px; }
.rank-item:nth-child(1) .rank-num { color: #FFC857; }
.rank-item:nth-child(2) .rank-num { color: #C7CCD8; }
.rank-item:nth-child(3) .rank-num { color: #C97A4A; }
.rank-name { flex: 1; color: #9AA3B5; }
.rank-home { display:block; margin-top:1px; color:#596376; font-size:8.5px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:180px; }
.rank-value {
  margin-left: auto; padding: 2px 0; border: 0; background: transparent; color: inherit;
  font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--font-mono);
  cursor: pointer; position: relative; text-align: right; white-space: nowrap;
}
.rank-value:hover .rank-value-short { text-decoration: underline dotted; text-underline-offset: 3px; }
.rank-value-exact {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  padding: 6px 8px; border-radius: 6px; border: 1px solid #313A4D;
  background: #080B11; color: #F1F4FA; box-shadow: 0 8px 22px rgba(0,0,0,.35);
  font-size: 11px; line-height: 1; white-space: nowrap; pointer-events: none;
}
.rank-value.show-exact .rank-value-exact { display: block; }
.rank-item.me { background: rgba(255,62,127,0.08); border-radius: 6px; }
.rank-item.me .rank-name { color: #EAEEF5; font-weight: 700; }

/* ===== 매수/매도 모달 ===== */
.trade-overlay {
  position: fixed; inset: 0; background: rgba(5,7,12,0.7);
  display: none; align-items: center; justify-content: center; z-index: 50;
  padding: 16px;
}
.trade-overlay.open { display: flex; }
.trade-modal {
  width: 100%; max-width: 380px;
  background: #12161F; border: 1px solid #262C3B; border-radius: 14px;
  padding: 22px; position: relative;
}
.trade-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; color: #5C6478; font-size: 20px; line-height: 1;
}
.trade-head { margin-bottom: 16px; }
.trade-avatar-slot { margin-bottom: 10px; }
.trade-head h3 { margin: 0 0 4px; font-size: 18px; }
.trade-price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

.trade-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.trade-tab {
  flex: 1; padding: 9px 0; background: #0A0D14; border: 1px solid #262C3B;
  color: #9AA3B5; border-radius: 8px; font-weight: 700; font-size: 13px;
}
.trade-tab.active[data-side="buy"] {
  background: rgba(41,224,201,0.15); border-color: #29E0C9; color: #29E0C9;
  text-shadow: 0 0 6px rgba(41,224,201,0.35);
}
.trade-tab.active[data-side="sell"] {
  background: rgba(255,62,127,0.15); border-color: #FF3E7F; color: #FF3E7F;
  text-shadow: 0 0 6px rgba(255,62,127,0.3);
}

.trade-row { display: flex; justify-content: space-between; font-size: 12.5px; color: #9AA3B5; margin-bottom: 6px; }
.trade-qty-label { display: block; font-size: 11px; color: #5C6478; margin: 14px 0 6px; }
.trade-qty-input { display: flex; align-items: center; gap: 8px; }
.trade-qty-input button {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid #262C3B;
  background: #0A0D14; color: #EAEEF5; font-size: 16px;
}
.trade-qty-input input {
  flex: 1; text-align: center; background: #0A0D14; border: 1px solid #262C3B;
  border-radius: 8px; height: 34px; color: #EAEEF5; font-size: 14px; font-weight: 700;
}
.trade-quick { display: flex; gap: 6px; margin-top: 8px; }
.trade-quick button {
  flex: 1; padding: 6px 0; font-size: 11px; border-radius: 6px;
  border: 1px solid #262C3B; background: #0A0D14; color: #9AA3B5;
}
.trade-total {
  display: flex; justify-content: space-between; align-items: center;
  margin: 16px 0; padding-top: 12px; border-top: 1px solid #262C3B;
  font-size: 13px; color: #9AA3B5;
}
.trade-total strong { font-size: 17px; color: #EAEEF5; }
.trade-submit {
  width: 100%; padding: 13px 0; border: none; border-radius: 10px;
  background: #29E0C9; color: #05070C; font-weight: 800; font-size: 14px;
}
.trade-submit.sell-mode { background: #FF3E7F; color: #05070C; }
.trade-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.trade-msg { font-size: 11.5px; color: #FF3E7F; text-align: center; margin: 8px 0 0; min-height: 14px; }
.trade-result-name { font-size: 16px; font-weight: 800; margin: 4px 0 2px; }
.trade-result-detail { font-size: 13px; color: #9AA3B5; }

/* ===== 부동산 페이지 ===== */
.re-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1px;
  background: #262C3B;
  min-height: calc(100vh - 68px);
}
.re-listing-panel, .re-owned-panel { background: #0A0D14; padding: 20px 22px; }

.re-region-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.re-tab {
  padding: 7px 14px; border-radius: 8px; border: 1px solid #262C3B;
  background: #12161F; color: #9AA3B5; font-size: 12.5px; font-weight: 600;
}
.re-tab.active { background: rgba(122,62,255,0.18); border-color: #7A3EFF; color: #B79BFF; }

.re-property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.re-card {
  background: #12161F; border: 1px solid #262C3B; border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.re-thumb { width: 100%; height: 120px; object-fit: cover; display: block; background: #1A1F2C; }
.re-thumb-empty {
  background: linear-gradient(135deg, rgba(255,62,127,0.15), rgba(122,62,255,0.15) 60%, rgba(41,224,201,0.15));
}
.re-card-body { padding: 12px 14px 6px; flex: 1; }
.re-card-region { font-size: 10.5px; color: #5C6478; letter-spacing: 0.03em; }
.re-card-name { font-size: 14px; font-weight: 700; margin: 3px 0 6px; }
.re-card-price { font-size: 13.5px; font-weight: 800; color: #29E0C9; font-variant-numeric: tabular-nums; font-family: var(--font-mono); display: flex; align-items: center; gap: 6px; }
.re-card-change { font-size: 11px; font-weight: 700; }
.re-card-change.up { color: #29E0C9; }
.re-card-change.down { color: #FF3E7F; }
.re-card-change.flat { color: #5C6478; }
.re-card-supply { font-size: 11px; color: #9AA3B5; margin-top: 4px; }
.re-card-owned { font-size: 11px; color: #FFC857; margin-top: 4px; }
.btn-buy {
  margin: 8px 14px 14px; padding: 9px 0; border: none; border-radius: 8px;
  background: #29E0C9; color: #05070C; font-weight: 800; font-size: 13px;
}
.btn-buy:disabled { background: #262C3B; color: #5C6478; }

.re-owned-list { display: flex; flex-direction: column; gap: 8px; }
.re-owned-item {
  padding: 10px 12px; background: #12161F; border-radius: 8px; font-size: 12.5px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.re-owned-thumb {
  width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #1A1F2C;
}
.re-owned-thumb-empty {
  background: linear-gradient(135deg, rgba(255,62,127,0.15), rgba(122,62,255,0.15) 60%, rgba(41,224,201,0.15));
}
.re-owned-info { flex: 1; min-width: 0; }
.re-owned-name { font-weight: 700; }
.re-owned-price { color: #5C6478; font-size: 11px; margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.re-owned-pl { font-weight: 700; }
.re-owned-pl.up { color: #29E0C9; }
.re-owned-pl.down { color: #FF3E7F; }
.btn-sell {
  flex-shrink: 0; padding: 7px 12px; border: none; border-radius: 7px;
  background: rgba(255,62,127,0.15); color: #FF3E7F; font-weight: 700; font-size: 12px;
}

/* ===== 명화 페이지 ===== */
.mp-layout { max-width: 1100px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 1px; background: #262C3B; }
.mp-panel, .mp-owned-panel { background: #0A0D14; padding: 20px 22px; border-radius: 10px; }

.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.mp-card {
  background: #12161F; border: 1px solid #262C3B; border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.mp-thumb {
  width: 100%; aspect-ratio: 2 / 3; object-fit: contain;
  display: block; background: #05070C;
}
.mp-card-body { padding: 12px 14px 6px; flex: 1; }
.mp-card-name { font-size: 14px; font-weight: 700; margin: 6px 0 6px; }
.mp-card-price { font-size: 13.5px; font-weight: 800; color: #29E0C9; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.mp-card-supply { font-size: 11px; color: #9AA3B5; margin-top: 4px; }
.mp-card-countdown { font-size: 10.5px; color: #FFC857; margin-top: 4px; }

.mp-owned-list { display: flex; flex-direction: column; gap: 8px; }
.mp-owned-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: #12161F; border-radius: 8px;
}
.mp-owned-thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #1A1F2C; }
/* 남는 폭을 정보 영역이 가져가서 판매 버튼이 오른쪽 끝에 붙게 합니다 */
.mp-owned-info { flex: 1; min-width: 0; }
.mp-owned-name { font-size: 13px; font-weight: 700; margin: 3px 0; }
.mp-owned-value { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }

/* 등급 배지 색상 — 태그 재사용 + 등급 전용 색 추가 */
.tag.grade-r { background: rgba(90,100,120,0.25); color: #9AA3B5; }
.tag.grade-sr { background: rgba(41,224,201,0.15); color: #29E0C9; }
.tag.grade-ssr { background: rgba(122,62,255,0.18); color: #B79BFF; }
.tag.grade-lr { background: rgba(255,200,87,0.15); color: #FFC857; }
.tag.grade-ar { background: rgba(255,62,127,0.15); color: #FF3E7F; }
.tag.grade-ur { background: linear-gradient(135deg, rgba(255,62,127,0.25), rgba(122,62,255,0.25)); color: #FFFFFF; }

/* ===== 종목 상세 페이지 ===== */
.back-link { color: #9AA3B5; text-decoration: none; font-size: 18px; margin-right: 6px; }
.back-link:hover { color: #EAEEF5; }

.detail-layout {
  max-width: 1180px; margin: 0 auto; padding: 20px 20px 100px;
  display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start;
}
.detail-hero {
  position: sticky; top: 20px;
  background: linear-gradient(160deg, #12161F, #0A0D14);
  border: 1px solid #262C3B; border-radius: 14px; overflow: hidden;
}
.detail-hero-inner { width: 100%; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; }
.detail-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; display: block; }
.detail-hero-empty {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,62,127,0.15), rgba(122,62,255,0.15) 60%, rgba(41,224,201,0.15));
}
.detail-main-panel { background: #0A0D14; border-radius: 12px; padding: 22px; min-width: 0; }

.detail-header { margin-bottom: 18px; }
.detail-title { flex: 1; min-width: 0; }
.detail-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-name-row h1 { font-size: 22px; margin: 0; }
.detail-like {
  width: 34px; height: 34px; border: 1px solid #262C3B; border-radius: 50%;
  background: #12161F; color: #5C6478; font-size: 17px;
}
.detail-like.liked { color: #FF3E7F; border-color: rgba(255,62,127,0.4); }
/* 1위 보유자 표시 — "정실 남편 : 닉네임" 형식. 관심종목 버튼 옆. */
.detail-top-holder {
  font-size: 11.5px; color: #9AA3B5; font-family: var(--font-mono);
  background: #12161F; border: 1px solid #262C3B; border-radius: 20px;
  padding: 4px 10px 4px 12px; white-space: nowrap;
  align-items: center; gap: 5px;
}
.detail-top-holder b { color: #FFC857; font-weight: 700; }
.detail-top-holder-qty {
  display: inline-flex; align-items: center; margin-left: 3px; padding: 2px 7px;
  border-radius: 10px; background: rgba(41,224,201,0.08); color: #29E0C9;
  border: 1px solid rgba(41,224,201,0.15); font-size: 10px; font-weight: 800;
}
.detail-price-row { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.detail-price { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.detail-change { font-size: 15px; font-weight: 700; }
.detail-change.up { color: #29E0C9; }
.detail-change.down { color: #FF3E7F; }
.detail-change.flat { color: #5C6478; }
.detail-meta { font-size: 12px; color: #9AA3B5; margin-top: 4px; }
.detail-spouse-challenge {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%;
  margin-top: 7px; padding: 5px 9px; border-radius: 8px;
  border: 1px solid rgba(255,200,87,0.22); background: rgba(255,200,87,0.06);
  color: #AEB7C8; font-size: 11px; line-height: 1.35;
}
.detail-spouse-challenge[hidden] { display: none !important; }
.detail-spouse-challenge b { color: #FFC857; font-family: var(--font-mono); }
.detail-spouse-challenge.is-current {
  border-color: rgba(255,200,87,0.34); background: rgba(255,200,87,0.10); color: #E9D69D;
}
.detail-spouse-challenge.is-ahead {
  border-color: rgba(41,224,201,0.28); background: rgba(41,224,201,0.07); color: #9EDDD4;
}
.detail-spouse-challenge.is-ahead b { color: #29E0C9; }

.achievement-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.achievement-label { font-size: 11px; color: #5C6478; }
.achievement-icons { display: flex; gap: 6px; flex-wrap: wrap; }
.achievement-icon {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,200,87,0.4);
  background: rgba(255,200,87,0.1); font-size: 14px; padding: 0;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.achievement-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.achievement-icon:hover { background: rgba(255,200,87,0.2); }
.achievement-popup-icon {
  font-size: 40px; margin: 0 auto 6px; width: 64px; height: 64px; border-radius: 50%;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.achievement-popup-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.achievement-popup-desc { font-size: 13px; color: #9AA3B5; margin: 6px 0; }
.achievement-popup-date { font-size: 11px; color: #5C6478; }

.detail-chart-wrap { position: relative; }
.detail-chart { width: 100%; height: 220px; display: block; background: #05070C; border-radius: 10px; cursor: crosshair; }
.chart-tooltip {
  display: none; position: absolute; pointer-events: none;
  background: rgba(10,13,20,0.95); border: 1px solid #262C3B; border-radius: 8px;
  padding: 8px 10px; z-index: 5; white-space: nowrap;
}
.chart-tooltip-time { font-size: 10.5px; color: #9AA3B5; }
.chart-tooltip-price { font-size: 14px; font-weight: 800; color: #EAEEF5; margin-top: 2px; }

/* 차트 아래 정보 영역 — 왼쪽은 역대 정실 남편, 오른쪽은 최신 관련 뉴스 5건.
   뉴스가 상세 화면 세로 길이를 과도하게 차지하지 않도록 두 영역을 한 줄에 묶습니다. */
.detail-info-grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: 14px; margin-top: 18px; align-items: stretch;
}
.detail-compact-section {
  min-width: 0; background: #0D111A; border: 1px solid #1C2230; border-radius: 10px;
  padding: 14px;
}
.detail-compact-section .panel-head { margin: 0 0 10px; }
.detail-compact-section .panel-head h2 { font-size: 14px; }
.detail-news-feed { flex: none; gap: 7px; max-height: 190px; overflow-y: auto; }
.detail-news-feed .news-item { padding: 8px 10px; font-size: 12px; }
.detail-news-feed .news-item .n-time { font-size: 9.5px; }

.spouse-history-table-head,
.spouse-history-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 78px 54px; gap: 8px; align-items: center;
}
.spouse-history-table-head {
  color: #5C6478; font-size: 9.5px; font-family: var(--font-mono);
  padding: 0 9px 6px; border-bottom: 1px solid #1C2230;
}
.spouse-history-table-head span:nth-child(n+2),
.spouse-history-row span:nth-child(n+2) { text-align: right; }
.spouse-history-list {
  max-height: 190px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px;
  padding-top: 6px;
}
.spouse-history-row {
  padding: 7px 9px; border-radius: 7px; background: #12161F; font-size: 11.5px;
  border: 1px solid transparent;
}
.spouse-history-row.current {
  background: rgba(255,200,87,0.08); border-color: rgba(255,200,87,0.28);
}
.spouse-history-nick {
  min-width: 0; overflow: hidden;
  color: #EAEEF5; font-weight: 700;
  display: flex; flex-direction: column; gap: 2px; line-height: 1.15;
}
.spouse-history-nick > span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spouse-history-nick small {
  display: block; color: #687287; font-size: 8.5px; font-weight: 500; font-family: var(--font-mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spouse-history-nick em {
  display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 8px;
  background: rgba(255,200,87,0.14); color: #FFC857; font-size: 8.5px;
  font-style: normal; font-family: var(--font-mono); vertical-align: 1px;
}
.spouse-history-days { color: #FFC857; font-family: var(--font-mono); }
.spouse-history-times { color: #9AA3B5; font-family: var(--font-mono); }
.spouse-history-empty { padding: 24px 8px; }

.comment-input-row { display: flex; gap: 8px; margin-top: 10px; margin-bottom: 12px; align-items: stretch; }
.comment-input-row input {
  flex: 1; min-width: 0; background: #12161F; border: 1px solid #262C3B; border-radius: 8px;
  padding: 8px 12px; color: #EAEEF5; font-size: 13px;
}
.comment-submit-btn {
  flex: 0 0 88px; border: none; border-radius: 8px;
  background: #29E0C9; color: #05070C; font-weight: 800; font-size: 15px;
}
.comment-submit-btn:active { background: #22C4AF; }
.comment-list { display: flex; flex-direction: column; gap: 8px; }
.comment-item {
  padding: 10px 12px; background: #12161F; border-radius: 8px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px;
}
.comment-nick { font-weight: 700; color: #B79BFF; flex-shrink: 0; }
/* 종목 보유 수량 기준 칭호 배지 — 닉네임 바로 옆에 붙습니다. */
.comment-title-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; font-family: var(--font-mono); white-space: nowrap;
  background: rgba(255,200,87,0.14); color: #FFC857; border: 1px solid rgba(255,200,87,0.35);
}
.comment-text { flex: 1; min-width: 120px; }
.comment-time { font-size: 10.5px; color: #5C6478; flex-shrink: 0; }

.bottom-action-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; gap: 1px; background: #262C3B;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.4); z-index: 40;
}
.bottom-action-btn {
  flex: 1; padding: 16px 0; border: none; font-size: 15px; font-weight: 800;
}
.bottom-action-btn.sell { background: #12161F; color: #FF3E7F; }
.bottom-action-btn.buy { background: #29E0C9; color: #05070C; }

/* ===== 반응형 ===== */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .re-layout { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-hero { position: static; max-width: 320px; margin: 0 auto; }
  .detail-info-grid { grid-template-columns: 1fr 1fr; }
  .account { gap: 14px; }
}
@media (max-width: 720px) {
  .detail-info-grid { grid-template-columns: 1fr; }
  .detail-news-feed, .spouse-history-list { max-height: 210px; }
}
@media (max-width: 560px) {
  .breaking-banner { padding: 8px 16px; }
  .panel { padding: 16px; }
  .re-listing-panel, .re-owned-panel { padding: 16px; }
  .detail-layout { padding: 14px 14px 100px; }
  .ticker-track { animation-duration: 320s; }
}

/* =====================================================================
   모바일 상단바 재구성 (≤760px)

   기존에는 .topbar가 flex 한 줄이라 브랜드 + 현금/총자산/닉네임 + 내비 버튼
   3개 + 아바타가 전부 가로로 늘어서서, 좁은 화면에서 부동산/명화/퀘스트
   버튼이 화면 밖으로 밀려났습니다(옆으로 스크롤해야 보임).

   여기서는 3단으로 접습니다:
     1행  브랜드 + 접속자 배지                      (아바타는 우상단 고정)
     2행  보유현금 / 총자산
     3행  부동산 · 명화 · 퀘스트  (균등 분할)

   .account 안의 요소 구성이 페이지마다 다르기 때문에(내 자산 페이지는 버튼
   1개, 종목 상세는 2개 등), nth-child로 자리를 지정하지 않고 flex-wrap과
   flex-basis만으로 자연스럽게 접히게 했습니다. 버튼 수가 달라져도 깨지지
   않습니다.
   ===================================================================== */
@media (max-width: 760px) {
  .topbar {
    position: relative;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px 12px;
  }

  .brand {
    flex: 1 1 100%;
    padding-right: 46px;
    min-width: 0;
  }
  .brand-text strong { font-size: 15px; white-space: nowrap; }
  .brand-text span { font-size: 10px; white-space: nowrap; }
  .online-badge { margin-left: auto; }

  .my-info-btn {
    position: absolute;
    top: 10px;
    right: 14px;
  }

  .account {
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
  }

  .account-item {
    flex: 1 1 40%;
    align-items: flex-start;
  }
  .account-item .label { display: block; font-size: 9.5px; }
  .account-item .value { font-size: 14px; }
  .account-item-nickname { display: none; }

  .top-nav-menu {
    flex: 1 1 100%;
    order: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 0;
    margin-left: 0;
    border-left: 0;
  }
  .top-nav-menu > * {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
  .top-nav-menu .btn-ghost-link,
  .top-nav-menu .nav-group-toggle {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 9px 8px;
    font-size: 13px;
  }
  .nav-group-menu {
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 0;
    padding: 8px;
  }
  .nav-group-menu .top-nav-link {
    min-height: 34px;
    justify-content: center;
  }
}

/* ===== 내 정보 버튼 / 모달 ===== */
.my-info-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid #262C3B;
  background: #12161F; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; padding: 0; overflow: hidden;
}
.my-info-modal { max-width: 380px; max-height: 84vh; overflow-y: auto; }
.my-info-modal h3 { margin: 0 0 14px; font-size: 17px; }
.my-info-nickname-row { display: flex; gap: 8px; margin-top: 6px; }
.my-info-nickname-row input {
  flex: 1; min-width: 0; background: #0A0D14; border: 1px solid #262C3B; border-radius: 8px;
  padding: 8px 12px; color: #EAEEF5; font-size: 13px;
}
.my-info-google { margin-top: 18px; padding-top: 14px; border-top: 1px solid #262C3B; }
.my-info-portfolio-link {
  display: block; margin-top: 14px; padding: 10px 14px; border-radius: 8px;
  background: rgba(41,224,201,0.1); border: 1px solid rgba(41,224,201,0.3);
  color: #29E0C9; font-size: 12.5px; font-weight: 700; text-decoration: none; text-align: center;
}
.my-info-portfolio-link:hover { background: rgba(41,224,201,0.18); }
.my-info-toggle-row {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  font-size: 12px; color: #9AA3B5; cursor: pointer;
}
.my-info-toggle-row input { width: auto; margin: 0; }

/* ===== 내 자산 페이지 ===== */
.portfolio-layout { max-width: 900px; margin: 0 auto; padding: 20px 20px 60px; display: flex; flex-direction: column; gap: 16px; }
.portfolio-summary-panel { background: linear-gradient(160deg, #12161F, #0A0D14); border: 1px solid #262C3B; border-radius: 14px; padding: 24px; }
.portfolio-total-label { font-size: 12px; color: #9AA3B5; }
.portfolio-total-value { font-size: 32px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.portfolio-total-pl { font-size: 14px; font-weight: 700; margin-top: 4px; }
.portfolio-total-pl.up { color: #29E0C9; }
.portfolio-total-pl.down { color: #FF3E7F; }
.portfolio-total-pl.flat { color: #5C6478; }
.portfolio-breakdown { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: #9AA3B5; }
.portfolio-breakdown b { color: #EAEEF5; font-weight: 700; }

.portfolio-main-panel { background: #0A0D14; border-radius: 12px; padding: 20px; }
.portfolio-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.portfolio-tab {
  padding: 8px 16px; border-radius: 20px; border: 1px solid #262C3B;
  background: #12161F; color: #9AA3B5; font-size: 13px; font-weight: 700;
}
.portfolio-tab.active { background: rgba(41,224,201,0.15); border-color: #29E0C9; color: #29E0C9; }

.portfolio-section-title {
  font-size: 11px; color: #7A8699; font-weight: 700; margin: 18px 0 8px;
  font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.portfolio-section-title::before { content: "// "; color: var(--up); }
.portfolio-section-title:first-child { margin-top: 0; }
.portfolio-list { display: flex; flex-direction: column; gap: 6px; }

.pf-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #12161F; border-radius: 8px; cursor: pointer;
}
.pf-item:hover { background: #171B26; }
.pf-item-info { flex: 1; min-width: 0; }
.pf-item-name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pf-item-sub { font-size: 11px; color: #5C6478; margin-top: 2px; }
.pf-item-right { text-align: right; flex-shrink: 0; }
.pf-item-value { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.pf-item-pl { font-size: 11px; font-weight: 700; margin-top: 2px; }
.pf-item-pl.up { color: #29E0C9; }
.pf-item-pl.down { color: #FF3E7F; }

.pf-history-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #12161F; border-radius: 8px;
}
.pf-history-badge {
  flex-shrink: 0; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 800;
}
.pf-history-badge.buy { background: rgba(41,224,201,0.15); color: #29E0C9; }
.pf-history-badge.sell { background: rgba(255,62,127,0.15); color: #FF3E7F; }
.my-info-section-title { font-size: 12px; color: #9AA3B5; margin: 18px 0 8px; font-weight: 700; }
.hint { font-size: 11.5px; color: #5C6478; line-height: 1.5; }

.my-info-title-list {
  display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto;
}
.my-info-title-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: #12161F; border-radius: 8px; text-decoration: none;
}
.my-info-title-row:hover { background: #171c28; }
.my-info-title-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
  font-family: var(--font-mono); white-space: nowrap;
  background: rgba(255,200,87,0.14); color: #FFC857; border: 1px solid rgba(255,200,87,0.35);
}
.my-info-title-stock { flex: 1; min-width: 0; font-size: 12.5px; color: #EAEEF5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-info-title-qty { flex-shrink: 0; font-size: 11px; color: #7A8699; font-family: var(--font-mono); }

.profile-image-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  max-height: 220px; overflow-y: auto;
}
.profile-pick {
  border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden;
  background: #12161F; aspect-ratio: 1;
}
.profile-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-pick:hover { border-color: #29E0C9; }

.trade-msg.success { color: #29E0C9; }

/* ===== 워터마크 ===== */
.watermark {
  position: fixed; bottom: 8px; right: 12px; z-index: 30;
  font-size: 11px; color: #5C6478; opacity: 0.55;
  pointer-events: none; user-select: none;
}
/* 워터마크 자체는 클릭을 막아서 화면 조작을 방해하지 않지만, 그 안의
   법적고지 링크만은 예외적으로 클릭 가능하게 열어둡니다. */
.watermark a { pointer-events: auto; color: #5C6478; text-decoration: underline; }
.watermark a:hover { color: #9AA3B5; }
.watermark.above-bar { bottom: 62px; } /* stock.html의 하단 매수/매도 바 위로 */

/* ===== 적립금 위젯 ===== */
.idle-income-widget {
  position: fixed; bottom: 8px; left: 12px; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  background: rgba(10,13,20,0.92); border: 1px solid #262C3B; border-radius: 20px;
  padding: 6px 8px 6px 14px;
}
.idle-income-label { font-size: 10.5px; color: #9AA3B5; }
.idle-income-amount {
  font-size: 13px; font-weight: 800; color: #FFC857;
  font-variant-numeric: tabular-nums; font-family: var(--font-mono);
}
.idle-income-claim {
  border: none; border-radius: 14px; padding: 5px 12px;
  background: #29E0C9; color: #05070C; font-weight: 800; font-size: 11.5px;
}
.idle-income-claim:disabled { background: #262C3B; color: #5C6478; }
.idle-income-widget.above-bar { bottom: 62px; }

@media (max-width: 560px) {
  .idle-income-widget { left: 8px; bottom: 8px; padding: 5px 6px 5px 12px; }
}

/* ===== 일일 퀘스트 페이지 ===== */
.quests-layout { max-width: 720px; margin: 0 auto; padding: 20px 20px 60px; }
.quests-panel { background: #0A0D14; border-radius: 12px; padding: 20px; }

/* ===== 구단 페이지 ===== */
.club-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.club-card {
  background: #12161F; border: 1px solid #262C3B; border-radius: 10px;
  padding: 16px 14px; text-align: left; font-family: inherit; cursor: pointer;
}
.club-card:hover { border-color: var(--up); }
.club-card-name { font-size: 14px; font-weight: 700; color: #EAEEF5; margin-bottom: 4px; }
.club-card-stat { font-size: 11px; color: #7A8699; font-family: var(--font-mono); }

.club-board { margin-bottom: 22px; }
.club-board:last-child { margin-bottom: 0; }
.club-board-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #1a2330;
}
.club-board-title { font-size: 13.5px; font-weight: 700; color: #EAEEF5; }
.club-board-stat { font-size: 10.5px; color: #5C6478; font-family: var(--font-mono); white-space: nowrap; }

.club-board-history { display: flex; flex-direction: column; gap: 2px; }
.club-history-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px;
  border-bottom: 1px solid #12161f;
}
.club-history-row:last-child { border-bottom: none; }
.club-history-serial {
  flex-shrink: 0; min-width: 44px; font-size: 11px; font-weight: 700;
  color: #FFC857; font-family: var(--font-mono);
}
.club-history-avatar {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  background: #1A1F2C;
}
.club-history-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #9AA3B5;
}
.club-history-headline { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.4; }
.club-history-time { flex-shrink: 0; font-size: 10.5px; color: #5C6478; font-family: var(--font-mono); }

/* 헤드라인 색상 — news-item과 같은 색상표를 쓰되, 이쪽은 카드/줄무늬 없이 텍스트 색만 */
.club-tag-pos { color: #29E0C9; }
.club-tag-neg { color: #FF3E7F; }
.club-tag-market { color: #FFC857; }
.club-tag-mixed { color: #B79BFF; }
.club-tag-rumor { color: #B8C2D4; font-style: italic; }

.quest-list { display: flex; flex-direction: column; gap: 10px; }
.quest-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: #12161F; border: 1px solid #262C3B; border-radius: 10px;
}
.quest-card-highlight { border-color: rgba(255,200,87,0.4); background: rgba(255,200,87,0.06); }
.quest-card-icon { font-size: 22px; flex-shrink: 0; }
.quest-card-info { flex: 1; min-width: 0; }
.quest-card-title { font-size: 14px; font-weight: 700; }
.quest-card-desc { font-size: 11.5px; color: #5C6478; margin-top: 3px; }
.quest-card-right { text-align: right; flex-shrink: 0; }
.quest-card-reward { font-size: 12.5px; font-weight: 800; color: #FFC857; margin-bottom: 6px; white-space: nowrap; }

.quest-claim-btn {
  border: none; border-radius: 8px; padding: 7px 16px; font-size: 12.5px; font-weight: 800;
}
.quest-claim-btn.ready { background: #29E0C9; color: #05070C; }
.quest-claim-btn.pending { background: #262C3B; color: #5C6478; }
.quest-claim-btn.claimed { background: rgba(41,224,201,0.12); color: #29E0C9; }

.quest-result-title { font-size: 15px; font-weight: 700; margin: 10px 0 4px; }
.quest-result-reward { font-size: 17px; font-weight: 800; color: #FFC857; }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .stock-row.event-flash { animation: none; }
  .news-item { animation: none; }
}

/* =====================================================================
   모바일 하단 여백 — 이 블록은 반드시 파일 끝에 둡니다.

   .portfolio-layout / .quests-layout 등이 `padding: 20px 20px 60px` 같은
   단축 속성으로 선언돼 있어서, 이 규칙이 그 선언보다 위에 있으면
   (미디어 쿼리는 우선순위를 올려주지 않으므로) 뒤에 오는 단축 속성에
   덮어써집니다. 그래서 맨 끝에 배치했습니다.

   적립금 위젯과 워터마크가 position:fixed라 페이지 맨 아래 콘텐츠(랭킹 등)를
   가리기 때문에, 그만큼 여백을 확보합니다.
   ===================================================================== */
@media (max-width: 760px) {
  .layout,
  .re-layout,
  .mp-layout,
  .quests-layout,
  .portfolio-layout,
  .detail-layout {
    padding-bottom: 70px;
  }
  /* 워터마크는 좁은 화면에서 적립금 위젯과 가로로 나란히 두기 어려워 위로 올립니다. */
  .watermark { bottom: 48px; right: 10px; font-size: 10px; }
  .watermark.above-bar { bottom: 104px; }
}

/* =====================================================================
   부동산 2차 UI — 임대수익 / 대표 주거지 / 정실 동거
   ===================================================================== */
.re-layout { grid-template-columns: minmax(0, 1fr) 460px; }
.re-overview-panel {
  grid-column: 1 / -1; background: #080B11; padding: 22px 24px;
  border-bottom: 1px solid #262C3B;
}
.re-overview-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:16px; }
.re-overview-head h2 { margin:2px 0 5px; font-size:20px; }
.re-overview-head p { margin:0; color:#70798D; font-size:12px; }
.re-kicker { color:#29E0C9; font:700 10px/1.3 var(--font-mono); letter-spacing:.08em; }
.re-rent-claim {
  border:1px solid rgba(41,224,201,.55); background:rgba(41,224,201,.11); color:#29E0C9;
  border-radius:9px; padding:10px 18px; font-weight:800; white-space:nowrap;
}
.re-rent-claim:hover:not(:disabled) { background:rgba(41,224,201,.18); }
.re-rent-claim:disabled { opacity:.38; cursor:not-allowed; }
.re-overview-grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; }
.re-stat-card { border:1px solid #202635; background:#0E121A; border-radius:11px; padding:14px 16px; min-width:0; }
.re-stat-card.accent { border-color:rgba(255,200,87,.32); background:linear-gradient(135deg, rgba(255,200,87,.06), #0E121A 55%); }
.re-stat-card > span { display:block; color:#70798D; font-size:10.5px; margin-bottom:5px; }
.re-stat-card strong { display:block; font:800 18px/1.2 var(--font-mono); color:#EAEEF5; }
.re-stat-card.accent strong { color:#FFC857; }
.re-stat-card small { display:block; margin-top:5px; color:#5C6478; font-size:10px; }
.re-home-card { margin-top:12px; border:1px solid #242B3B; background:#0C1017; border-radius:12px; overflow:hidden; }
.re-home-empty { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 17px; }
.re-home-empty strong { display:block; margin:4px 0 3px; font-size:14px; }
.re-home-empty p { margin:0; color:#70798D; font-size:11px; }
.re-home-manage { flex-shrink:0; text-decoration:none; }
.re-home-visual { display:grid; grid-template-columns:150px minmax(0,1fr) auto; align-items:center; gap:16px; min-height:112px; padding:12px; }
.re-home-visual > img, .re-home-image-empty { width:150px; height:88px; border-radius:9px; object-fit:cover; background:#141A24; }
.re-home-image-empty { background:linear-gradient(135deg,rgba(255,62,127,.13),rgba(122,62,255,.15),rgba(41,224,201,.12)); }
.re-home-copy { min-width:0; }
.re-home-copy > strong { display:block; margin:4px 0; font-size:16px; }
.re-home-meta { color:#8B94A7; font-size:11px; margin-bottom:8px; }
.re-home-story { color:#E2D3A7; font-size:10.5px; margin:-3px 0 8px; }
.re-home-spouses { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.re-home-spouse { display:flex; align-items:center; gap:5px; background:#131925; border:1px solid #252D3D; border-radius:18px; padding:3px 8px 3px 3px; max-width:170px; }
.re-home-spouse img, .re-home-spouse > span { width:23px; height:23px; border-radius:50%; object-fit:cover; background:#20283A; flex-shrink:0; }
.re-home-spouse em { color:#CBD2DF; font-size:10.5px; font-style:normal; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.re-home-no-spouse { color:#5C6478; font-size:10.5px; }
.re-panel-note { display:block; color:#5C6478; font-size:10px; margin-top:2px; }
.re-card-benefits { display:flex; gap:5px; flex-wrap:wrap; margin-top:8px; }
.re-card-benefits span { border:1px solid #252C3B; border-radius:5px; background:#0D1118; color:#8E98AA; padding:3px 5px; font-size:9.5px; }
.re-card-benefits span:first-child { color:#29E0C9; border-color:rgba(41,224,201,.2); }
.re-owned-item { align-items:stretch; padding:11px; border:1px solid transparent; }
.re-owned-item.primary { border-color:rgba(255,200,87,.34); background:linear-gradient(90deg,rgba(255,200,87,.055),#12161F 35%); }
.re-owned-thumb { width:54px; height:54px; }
.re-owned-title-row { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.re-primary-badge { color:#FFC857; border:1px solid rgba(255,200,87,.35); background:rgba(255,200,87,.08); border-radius:12px; padding:2px 6px; font:700 8.5px/1.2 var(--font-mono); }
.re-owned-benefits { display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; color:#8B94A7; font-size:10px; }
.re-owned-benefits .rent { color:#29E0C9; }
.re-owned-benefits .muted { color:#FFC857; }
.re-owned-actions { display:flex; flex-direction:column; justify-content:center; gap:5px; flex-shrink:0; }
.btn-home, .btn-sell { min-width:92px; padding:7px 9px; border-radius:7px; font-weight:700; font-size:10.5px; }
.btn-home { border:1px solid rgba(41,224,201,.3); background:rgba(41,224,201,.08); color:#29E0C9; }
.btn-home:hover { background:rgba(41,224,201,.14); }

.re-residence-modal { width:min(680px, calc(100vw - 28px)); max-width:680px; }
.re-residence-select { width:100%; border:1px solid #293143; background:#0A0D14; color:#EAEEF5; border-radius:8px; padding:10px 11px; margin:6px 0 10px; }
.re-residence-summary { display:flex; align-items:center; gap:11px; border:1px solid #222A39; border-radius:9px; background:#0D1118; padding:9px; }
.re-residence-summary img, .re-residence-summary-empty { width:82px; height:55px; object-fit:cover; border-radius:7px; flex-shrink:0; background:#171D29; }
.re-residence-summary strong { display:block; font-size:13px; }
.re-residence-summary span { display:block; color:#FFC857; font-size:10px; margin-top:2px; }
.re-residence-summary em { display:block; color:#7D879A; font-size:10px; font-style:normal; margin-top:3px; }
.re-spouse-head { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-top:16px; }
.re-spouse-head strong { font-size:13px; }
.re-spouse-head p { margin:2px 0 0; color:#5C6478; font-size:10px; }
.re-spouse-head > span { color:#FFC857; font:700 11px/1.2 var(--font-mono); }
.re-spouse-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; max-height:310px; overflow:auto; margin-top:9px; padding-right:2px; }
.re-spouse-pick { display:grid; grid-template-columns:35px minmax(0,1fr); grid-template-rows:auto auto; column-gap:8px; text-align:left; padding:7px; border:1px solid #252D3D; border-radius:8px; background:#10151E; color:#EAEEF5; }
.re-spouse-pick:hover { border-color:#39445A; }
.re-spouse-pick.selected { border-color:#29E0C9; background:rgba(41,224,201,.075); }
.re-spouse-pick img, .re-spouse-pick-empty { grid-row:1/3; width:35px; height:35px; border-radius:50%; object-fit:cover; background:#20283A; }
.re-spouse-pick > span:nth-child(2) { align-self:end; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:700; }
.re-spouse-pick em { align-self:start; color:#5C6478; font-size:9px; font-style:normal; }
.re-spouse-pick.selected em { color:#29E0C9; }
.re-residence-warning { margin-top:12px; color:#C49A45; background:rgba(255,200,87,.06); border:1px solid rgba(255,200,87,.18); border-radius:7px; padding:8px 9px; font-size:10px; }
.re-residence-actions { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; margin-top:12px; }
.re-unset-home { height:100%; border-color:#343B4B; color:#9AA3B5; }

/* 내 정보 모달에 동적으로 추가되는 대표 주거지 프로필 */
.my-info-residence-card { display:flex; gap:10px; align-items:center; border:1px solid #252D3D; background:#0D1118; border-radius:9px; padding:9px; margin-top:7px; text-decoration:none; color:inherit; }
.my-info-residence-card > img, .my-info-residence-img-empty { width:72px; height:48px; object-fit:cover; border-radius:7px; background:#171D29; flex-shrink:0; }
.my-info-residence-copy { min-width:0; flex:1; }
.my-info-residence-copy strong { display:block; font-size:11.5px; }
.my-info-residence-copy span { display:block; color:#70798D; font-size:9.5px; margin-top:2px; }
.my-info-residence-spouses { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
.my-info-residence-spouses em { font-style:normal; font-size:9px; color:#FFC857; background:rgba(255,200,87,.07); border-radius:10px; padding:2px 5px; }

@media (max-width: 980px) {
  .re-layout { grid-template-columns:1fr; }
  .re-overview-panel { grid-column:auto; }
  .re-home-visual { grid-template-columns:130px minmax(0,1fr) auto; }
  .re-home-visual > img, .re-home-image-empty { width:130px; }
}
@media (max-width: 720px) {
  .re-overview-grid { grid-template-columns:1fr 1fr; }
  .re-stat-card.accent { grid-column:1/-1; }
  .re-home-visual { grid-template-columns:92px minmax(0,1fr); }
  .re-home-visual > img, .re-home-image-empty { width:92px; height:74px; }
  .re-home-manage { grid-column:1/-1; width:100%; text-align:center; }
  .re-spouse-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .re-overview-panel { padding:16px; }
  .re-overview-head { align-items:stretch; flex-direction:column; gap:10px; }
  .re-rent-claim { width:100%; }
  .re-overview-grid { grid-template-columns:1fr; }
  .re-stat-card.accent { grid-column:auto; }
  .re-home-empty { align-items:stretch; flex-direction:column; }
  .re-home-visual { grid-template-columns:74px minmax(0,1fr); gap:10px; }
  .re-home-visual > img, .re-home-image-empty { width:74px; height:64px; }
  .re-owned-item { display:grid; grid-template-columns:48px minmax(0,1fr); }
  .re-owned-thumb { width:48px; height:48px; }
  .re-owned-actions { grid-column:1/-1; flex-direction:row; }
  .btn-home, .btn-sell { flex:1; }
  .re-spouse-grid { grid-template-columns:1fr; max-height:280px; }
  .re-residence-actions { grid-template-columns:1fr; }
}

/* ===== 홈페이지 공지 팝업 ===== */
body.notice-popup-open { overflow: hidden; }
.notice-popup-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(3, 5, 10, 0.82);
  backdrop-filter: blur(5px);
}
.notice-popup-modal {
  width: min(920px, 94vw); height: min(650px, 84vh);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #0D1119; border: 1px solid #2A3342; border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0,0,0,.58), 0 0 0 1px rgba(41,224,201,.04) inset;
  position: relative;
}
.notice-popup-modal::before,
.notice-popup-modal::after {
  content: ""; position: absolute; width: 13px; height: 13px; pointer-events: none; z-index: 2;
}
.notice-popup-modal::before { top: 0; left: 0; border-top: 2px solid #29E0C9; border-left: 2px solid #29E0C9; }
.notice-popup-modal::after { right: 0; bottom: 0; border-right: 2px solid #FF3E7F; border-bottom: 2px solid #FF3E7F; }
.notice-popup-head {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; padding: 14px 20px;
  border-bottom: 1px solid #262C3B; background: #0A0D14;
}
.notice-popup-head-title { display: flex; align-items: baseline; gap: 12px; }
.notice-popup-head-title h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.notice-popup-terminal { color: #29E0C9; font: 700 10px/1 var(--font-mono); letter-spacing: .07em; }
.notice-popup-count {
  padding: 4px 9px; border-radius: 999px; border: 1px solid #2B3341;
  color: #7D879B; background: #111722; font: 700 10px/1 var(--font-mono);
}
.notice-popup-board { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 0; }
.notice-popup-list {
  min-height: 0; overflow-y: auto; padding: 10px;
  background: #090D14; border-right: 1px solid #202735;
}
.notice-popup-list-item {
  width: 100%; display: flex; flex-direction: column; gap: 5px; text-align: left;
  padding: 12px 13px; margin: 0 0 7px; border-radius: 7px;
  color: #B6BFCE; background: #111620; border: 1px solid transparent;
  transition: border-color .15s ease, background .15s ease;
}
.notice-popup-list-item:hover { background: #151B27; border-color: #30394A; }
.notice-popup-list-item.active {
  color: #EAEEF5; background: linear-gradient(90deg, rgba(41,224,201,.11), rgba(41,224,201,.025));
  border-color: rgba(41,224,201,.42);
}
.notice-popup-list-title {
  display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 13px; font-weight: 800;
}
.notice-popup-list-date { color: #5F6B80; font: 600 9.5px/1.3 var(--font-mono); }
.notice-popup-detail { min-width: 0; min-height: 0; overflow-y: auto; padding: 28px 30px 34px; }
.notice-popup-detail-meta { color: #667187; font: 600 10px/1.4 var(--font-mono); margin-bottom: 8px; }
.notice-popup-detail-title { margin: 0 0 20px; color: #F2F5FA; font-size: 22px; line-height: 1.35; }
.notice-popup-detail-body {
  color: #C7CED9; font-size: 14px; line-height: 1.85;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.notice-popup-coupon-wrap { margin-top: 28px; }
.notice-popup-coupon-label { margin-bottom: 7px; color: #818B9D; font-size: 11px; font-weight: 700; }
.notice-popup-coupon {
  width: min(440px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 15px; border-radius: 8px;
  border: 1px solid rgba(255,200,87,.42); background: rgba(255,200,87,.08); color: #FFC857;
}
.notice-popup-coupon:hover { background: rgba(255,200,87,.13); border-color: rgba(255,200,87,.72); }
.notice-popup-coupon.copied { border-color: rgba(41,224,201,.62); background: rgba(41,224,201,.08); }
.notice-popup-coupon code { font: 800 15px/1 var(--font-mono); letter-spacing: .05em; overflow-wrap: anywhere; }
.notice-popup-copy { flex-shrink: 0; color: #9AA3B5; font-size: 10.5px; font-weight: 700; }
.notice-popup-coupon.copied .notice-popup-copy { color: #29E0C9; }
.notice-popup-footer {
  min-height: 66px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid #262C3B; background: #0A0D14;
}
.notice-popup-hide-today,
.notice-popup-close { min-height: 38px; border-radius: 7px; padding: 0 17px; font-size: 12px; font-weight: 800; }
.notice-popup-hide-today { color: #8E98AA; background: transparent; border: 1px solid #303849; }
.notice-popup-hide-today:hover { color: #D1D7E0; border-color: #596377; }
.notice-popup-close { color: #07100F; background: #29E0C9; border: 1px solid #29E0C9; min-width: 92px; }
.notice-popup-close:hover { filter: brightness(1.06); }

@media (max-width: 700px) {
  .notice-popup-overlay { padding: 10px; align-items: stretch; }
  .notice-popup-modal { width: 100%; height: calc(100dvh - 20px); max-height: none; margin: auto; }
  .notice-popup-head { min-height: 58px; padding: 12px 15px; }
  .notice-popup-head-title h2 { font-size: 17px; }
  .notice-popup-terminal { display: none; }
  .notice-popup-board { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .notice-popup-list {
    display: flex; gap: 7px; overflow-x: auto; overflow-y: hidden;
    padding: 9px; border-right: 0; border-bottom: 1px solid #202735;
  }
  .notice-popup-list-item { flex: 0 0 min(240px, 72vw); margin: 0; padding: 9px 11px; }
  .notice-popup-detail { padding: 20px 18px 26px; }
  .notice-popup-detail-title { font-size: 19px; margin-bottom: 15px; }
  .notice-popup-detail-body { font-size: 13.5px; line-height: 1.75; }
  .notice-popup-footer { min-height: 62px; padding: 10px 12px; }
  .notice-popup-hide-today, .notice-popup-close { padding: 0 13px; }
}

/* ===== 내 정보 쇼룸형 프로필 개편 ===== */
.my-info-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  background: #0D1118;
  border-color: #293143;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.48);
}
.my-info-showroom-close { z-index: 8; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; background: rgba(8,11,17,.76); border: 1px solid rgba(255,255,255,.08); color: #A7B0C0; }
.my-info-showroom-close:hover { color: #fff; border-color: #465066; }

.my-info-hero {
  position: relative; min-height: 188px; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  padding: 30px 30px 26px; border-bottom: 1px solid #242C3A;
  background: radial-gradient(circle at 15% 10%, rgba(41,224,201,.11), transparent 36%), linear-gradient(120deg,#111722,#0C1017 68%);
}
.my-info-hero-backdrop { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.18; filter:saturate(.8) contrast(1.08); }
.my-info-hero-shade { position:absolute; inset:0; background:linear-gradient(90deg,rgba(7,10,15,.96) 0%,rgba(7,10,15,.80) 44%,rgba(7,10,15,.58) 100%); }
.my-info-hero-avatar-btn, .my-info-identity, .my-info-hero-portfolio { position:relative; z-index:2; }
.my-info-hero-avatar-btn { border:0; background:transparent; padding:0; display:flex; flex-direction:column; align-items:center; gap:7px; color:#8F9AAC; }
.my-info-hero-avatar { width:96px; height:96px; border-radius:50%; padding:2px; display:grid; place-items:center; background:linear-gradient(135deg,#29E0C9,#6F6BFF 52%,#FF3E7F); box-shadow:0 0 0 5px rgba(8,12,18,.82), 0 10px 30px rgba(0,0,0,.38); overflow:hidden; }
.my-info-hero-avatar > img, .my-info-hero-avatar > div { width:92px !important; height:92px !important; }
.my-info-avatar-edit { font-size:10px; font-weight:700; letter-spacing:.02em; }
.my-info-hero-avatar-btn:hover .my-info-avatar-edit { color:#29E0C9; }
.my-info-kicker { display:block; color:#29E0C9; font:800 10px/1 var(--font-mono); letter-spacing:.13em; margin-bottom:8px; }
.my-info-name-line { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.my-info-name-line h3 { margin:0; color:#F4F7FB; font-size:27px; line-height:1.15; letter-spacing:-.03em; }
.my-info-inline-edit { border:1px solid #343D50; background:rgba(13,17,24,.7); color:#96A0B2; border-radius:999px; padding:6px 10px; font-size:10px; font-weight:700; }
.my-info-inline-edit:hover { color:#E8EDF5; border-color:#566278; }
.my-info-primary-title { margin-top:10px; color:#FFC857; font-size:12px; font-weight:700; }
.my-info-hero-portfolio { align-self:end; color:#29E0C9; text-decoration:none; border:1px solid rgba(41,224,201,.32); background:rgba(41,224,201,.08); border-radius:9px; padding:10px 13px; font-size:11px; font-weight:800; white-space:nowrap; }
.my-info-hero-portfolio:hover { background:rgba(41,224,201,.14); }

.my-info-inline-editor, .my-info-profile-picker { margin:18px 24px 0; padding:16px; border:1px solid #283143; border-radius:12px; background:#10151E; }
.my-info-inline-editor { display:grid; grid-template-columns:minmax(150px,.7fr) minmax(260px,1.3fr); gap:16px; align-items:center; }
.my-info-inline-editor > div:first-child strong { display:block; color:#EDF1F7; font-size:13px; }
.my-info-inline-editor > div:first-child span { display:block; color:#697489; font-size:10px; margin-top:4px; }
.my-info-inline-editor .trade-msg { grid-column:2; margin:0; }
.my-info-subhead { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.my-info-subhead > div span, .my-info-section-head > div span { display:block; color:#29E0C9; font:800 9px/1 var(--font-mono); letter-spacing:.12em; margin-bottom:5px; }
.my-info-subhead > div strong, .my-info-section-head > div strong { color:#EEF2F8; font-size:14px; }
.my-info-mini-close { border:1px solid #323B4E; background:#0C1119; color:#8994A7; border-radius:7px; padding:6px 9px; font-size:10px; }

.my-info-assets { padding:22px 24px 0; }
.my-info-section-head { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; margin-bottom:11px; }
.my-info-section-head > a { color:#737F93; font-size:10px; font-weight:700; text-decoration:none; }
.my-info-section-head > a:hover { color:#29E0C9; }
.my-info-asset-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.my-info-asset-card { min-height:84px; padding:15px 16px; border:1px solid #252E3E; border-radius:11px; background:#10151D; }
.my-info-asset-card.total { background:linear-gradient(135deg,rgba(41,224,201,.10),rgba(16,21,29,.95) 55%); border-color:rgba(41,224,201,.26); }
.my-info-asset-card span { display:block; color:#6F7A8D; font-size:10px; margin-bottom:9px; }
.my-info-asset-card strong { color:#EEF3F9; font:800 20px/1.1 var(--font-mono); letter-spacing:-.03em; }
.my-info-asset-card.total strong { color:#29E0C9; }
.my-info-quick-links { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:9px; }
.my-info-quick-links a { min-height:36px; display:flex; align-items:center; justify-content:center; border:1px solid #273042; border-radius:8px; background:#0B1018; color:#A2ACBD; text-decoration:none; font-size:10.5px; font-weight:700; }
.my-info-quick-links a:hover { color:#EAF0F7; border-color:#465268; background:#121823; }
.account-asset-link { cursor:pointer; text-decoration:underline; text-decoration-color:rgba(41,224,201,.32); text-underline-offset:3px; }
.account-asset-link:hover { color:#29E0C9; }

.my-info-showcase-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr); gap:12px; padding:22px 24px 0; }
.my-info-showcase-card { min-width:0; border:1px solid #252E3E; border-radius:13px; background:#0F141C; padding:15px; }
.my-info-residence-profile { min-height:290px; }
.my-info-home-empty { min-height:290px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; border:1px dashed #303A4C; border-radius:11px; background:linear-gradient(145deg,#0A0F16,#111722); text-decoration:none; color:inherit; padding:24px; }
.my-info-home-empty-icon { width:54px; height:54px; display:grid; place-items:center; border-radius:50%; margin-bottom:13px; background:rgba(41,224,201,.08); color:#29E0C9; font-size:25px; }
.my-info-home-empty strong { font-size:14px; color:#EDF1F7; }
.my-info-home-empty span { max-width:360px; margin-top:7px; color:#6F7A8D; font-size:10.5px; line-height:1.55; }
.my-info-home-empty em { margin-top:15px; color:#29E0C9; font-size:10px; font-style:normal; font-weight:800; }
.my-info-home-visual { position:relative; display:block; height:166px; overflow:hidden; border-radius:11px; background:#151B25; text-decoration:none; color:inherit; }
.my-info-home-visual > img, .my-info-home-visual-empty { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:linear-gradient(145deg,#111824,#202A3B); }
.my-info-home-image { z-index:0; display:block; }
.my-info-home-visual-empty { z-index:0; }
.my-info-home-visual-shade { position:absolute; inset:0; background:linear-gradient(180deg,rgba(6,8,12,.05),rgba(6,8,12,.25) 40%,rgba(6,8,12,.92) 100%); }
.my-info-home-copy { position:absolute; z-index:2; left:16px; right:16px; bottom:14px; }
.my-info-home-copy span { display:block; color:#29E0C9; font:800 9px/1 var(--font-mono); letter-spacing:.09em; margin-bottom:5px; }
.my-info-home-copy strong { display:block; color:#fff; font-size:18px; letter-spacing:-.02em; }
.my-info-home-copy em { display:block; color:#A0AABC; font-size:9.5px; font-style:normal; margin-top:5px; }
.my-info-spouse-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:13px 1px 8px; color:#8E99AB; font-size:10px; }
.my-info-spouse-head b { color:#FFC857; font:800 10px/1 var(--font-mono); }
.my-info-spouse-gallery { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }
.my-info-spouse-card { min-width:0; text-decoration:none; color:inherit; border:1px solid #252E3E; border-radius:9px; background:#0A0F16; overflow:hidden; padding-bottom:7px; transition:.15s ease; }
.my-info-spouse-card:hover { transform:translateY(-2px); border-color:rgba(255,200,87,.48); }
.my-info-spouse-photo { display:block; width:100%; aspect-ratio:1/1.02; overflow:hidden; background:#161D28; }
.my-info-spouse-photo img { width:100%; height:100%; object-fit:cover; object-position:center 14%; display:block; }
.my-info-spouse-photo i { display:block; width:100%; height:100%; background:linear-gradient(145deg,#1B2431,#10151D); }
.my-info-spouse-card strong { display:block; margin:6px 6px 0; color:#E8EDF5; font-size:9px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.my-info-spouse-card small { display:block; margin:2px 6px 0; color:#FFC857; font-size:8px; font-weight:800; }
.my-info-spouse-empty { grid-column:1/-1; min-height:87px; display:flex; flex-direction:column; justify-content:center; align-items:center; border:1px dashed #2D3647; border-radius:9px; color:#7D8798; text-align:center; padding:13px; }
.my-info-spouse-empty strong { color:#AAB3C1; font-size:10.5px; }
.my-info-spouse-empty span { margin-top:4px; font-size:9px; }

.my-info-title-count { color:#6F7A8D; font:700 10px/1 var(--font-mono); }
.my-info-featured-titles { display:flex; flex-direction:column; gap:8px; }
.my-info-featured-title { min-height:72px; display:grid; grid-template-columns:25px 52px minmax(0,1fr); gap:9px; align-items:center; border:1px solid #263043; border-radius:10px; background:#0B1018; padding:8px 9px; text-decoration:none; color:inherit; }
.my-info-featured-title.rank-one { border-color:rgba(255,200,87,.34); background:linear-gradient(100deg,rgba(255,200,87,.07),#0B1018 55%); }
.my-info-featured-title:hover { border-color:#48556C; }
.my-info-featured-title-no { color:#465166; font:800 10px/1 var(--font-mono); }
.my-info-featured-title-avatar { width:52px; height:52px; border-radius:8px; overflow:hidden; background:#171E29; }
.my-info-featured-title-avatar img { width:100%; height:100%; object-fit:cover; object-position:center 14%; display:block; }
.my-info-featured-title-avatar i { display:block; width:100%; height:100%; background:linear-gradient(145deg,#1B2431,#10151D); }
.my-info-featured-title-copy { min-width:0; }
.my-info-featured-title-copy b { display:inline-block; color:#FFC857; font-size:8.5px; background:rgba(255,200,87,.09); border-radius:999px; padding:2px 6px; margin-bottom:3px; }
.my-info-featured-title-copy strong { display:block; color:#E9EEF5; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.my-info-featured-title-copy small { display:block; color:#687488; font-size:8.5px; margin-top:3px; }
.my-info-featured-empty { min-height:190px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:#8B96A8; border:1px dashed #2D3647; border-radius:10px; font-size:11px; }
.my-info-featured-empty span { margin-top:5px; color:#626D7F; font-size:9px; }
.my-info-expand-btn { width:100%; margin-top:9px; min-height:34px; border:1px solid #2B3547; border-radius:8px; background:#0A0F16; color:#8590A3; font-size:9.5px; font-weight:700; }
.my-info-expand-btn:hover { color:#D8DEE8; border-color:#465268; }
.my-info-title-list { margin-top:8px; max-height:230px; overflow-y:auto; border-top:1px solid #252E3E; padding-top:7px; }

.my-info-settings { margin:22px 24px 24px; border:1px solid #252E3E; border-radius:12px; background:#0C1118; overflow:hidden; }
.my-info-settings > summary { min-height:58px; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:0 16px; cursor:pointer; list-style:none; }
.my-info-settings > summary::-webkit-details-marker { display:none; }
.my-info-settings > summary span b { display:block; color:#CCD3DE; font-size:12px; }
.my-info-settings > summary span small { display:block; color:#626E82; font-size:9px; margin-top:3px; }
.my-info-settings > summary em { color:#6E7A8F; font-size:9px; font-style:normal; }
.my-info-settings[open] > summary { border-bottom:1px solid #252E3E; }
.my-info-settings[open] > summary em { color:#29E0C9; }
.my-info-settings-body { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding:13px; }
.my-info-settings-block { min-width:0; border:1px solid #222B3A; border-radius:9px; background:#10151D; padding:12px; }
.my-info-setting-title { color:#9EA8B8; font-size:10px; font-weight:800; margin-bottom:9px; }
.my-info-settings-block .my-info-google { margin:0; padding:0; border:0; }
.my-info-settings-block .trade-submit { margin-top:8px; min-height:36px; }
.my-info-settings-block .hint { min-height:28px; margin:0; font-size:9px; line-height:1.45; }
.my-info-settings-block .my-info-toggle-row { margin:0; }
.my-info-settings-block .my-info-nickname-row { margin-top:0; }
.my-info-settings-block .trade-msg { min-height:13px; margin-bottom:0; }

.my-info-profile-picker .profile-image-grid { grid-template-columns:repeat(10,1fr); max-height:260px; gap:7px; }
.my-info-profile-picker .profile-pick { border-radius:7px; }

@media (max-width: 820px) {
  .my-info-modal { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); border-radius:13px; }
  .my-info-hero { grid-template-columns:auto 1fr; gap:15px; padding:24px 19px 20px; min-height:164px; }
  .my-info-hero-avatar { width:78px; height:78px; }
  .my-info-hero-avatar > img, .my-info-hero-avatar > div { width:74px !important; height:74px !important; }
  .my-info-name-line h3 { font-size:21px; }
  .my-info-hero-portfolio { grid-column:1/-1; justify-self:stretch; text-align:center; align-self:auto; }
  .my-info-assets { padding:18px 14px 0; }
  .my-info-asset-cards { grid-template-columns:1fr; gap:7px; }
  .my-info-asset-card { min-height:64px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
  .my-info-asset-card span { margin:0; }
  .my-info-asset-card strong { font-size:17px; }
  .my-info-quick-links { grid-template-columns:repeat(2,1fr); }
  .my-info-showcase-grid { grid-template-columns:1fr; padding:18px 14px 0; }
  .my-info-spouse-gallery { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .my-info-settings { margin:18px 14px 16px; }
  .my-info-settings-body { grid-template-columns:1fr; }
  .my-info-inline-editor, .my-info-profile-picker { margin:14px 14px 0; }
  .my-info-inline-editor { grid-template-columns:1fr; }
  .my-info-inline-editor .trade-msg { grid-column:1; }
  .my-info-profile-picker .profile-image-grid { grid-template-columns:repeat(5,1fr); }
}

@media (max-width: 500px) {
  .my-info-hero { grid-template-columns:1fr; text-align:center; justify-items:center; }
  .my-info-name-line { justify-content:center; }
  .my-info-hero-portfolio { width:100%; }
  .my-info-spouse-gallery { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .my-info-home-visual { height:150px; }
  .my-info-profile-picker .profile-image-grid { grid-template-columns:repeat(4,1fr); }
}

/* ===== 승부예측 / Prediction Market ===== */
.prediction-layout { max-width: 1180px; margin: 0 auto; padding: 26px 24px 90px; }
.prediction-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 26px;
  padding: 24px 26px; border: 1px solid #262C3B; border-radius: 12px;
  background: radial-gradient(circle at 82% 12%, rgba(122,62,255,.16), transparent 34%),
              radial-gradient(circle at 12% 0%, rgba(41,224,201,.10), transparent 40%), #11161F;
}
.prediction-kicker { display:block; color:#29E0C9; font:800 9.5px/1 var(--font-mono); letter-spacing:.13em; margin-bottom:8px; }
.prediction-hero h1 { margin:0; font-size:28px; letter-spacing:-.04em; }
.prediction-hero p { margin:9px 0 0; max-width:650px; color:#8D98AA; font-size:12px; line-height:1.65; }
.prediction-rule-chips { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; max-width:410px; }
.prediction-rule-chips span { padding:7px 9px; border:1px solid #30394B; border-radius:999px; background:rgba(7,10,15,.56); color:#A9B3C3; font-size:9.5px; font-weight:700; white-space:nowrap; }
.prediction-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:17px 0 8px; }
.prediction-tabs { display:flex; gap:7px; }
.prediction-tab, .prediction-refresh { min-height:35px; border:1px solid #283143; border-radius:8px; background:#0D121A; color:#8590A3; padding:0 13px; font-size:10.5px; font-weight:800; }
.prediction-tab.active { color:#05070C; background:#29E0C9; border-color:#29E0C9; }
.prediction-refresh:hover { color:#E5EAF2; border-color:#445067; }
.prediction-refresh:disabled { opacity:.5; cursor:wait; }
.prediction-info-line { color:#5F6B7D; font-size:9.5px; line-height:1.5; margin:0 2px 14px; }
.prediction-list { display:flex; flex-direction:column; gap:14px; }
.prediction-empty { min-height:150px; display:flex; align-items:center; justify-content:center; border:1px solid #252E3E; border-radius:12px; background:#10151D; color:#6D788B; font-size:12px; }
.prediction-card { border:1px solid #262F3F; border-radius:13px; background:#10151D; padding:20px; overflow:hidden; }
.prediction-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.prediction-card-meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:#626E81; font-size:9px; }
.prediction-status { display:inline-flex; align-items:center; min-height:23px; padding:0 8px; border-radius:999px; font-size:8.5px; font-weight:900; letter-spacing:.03em; }
.prediction-status.open { background:rgba(41,224,201,.11); color:#29E0C9; }
.prediction-status.upcoming { background:rgba(122,62,255,.13); color:#B79BFF; }
.prediction-status.waiting { background:rgba(255,200,87,.12); color:#FFC857; }
.prediction-status.resolved { background:rgba(41,224,201,.11); color:#80EFE0; }
.prediction-status.cancelled { background:rgba(255,62,127,.11); color:#FF739E; }
.prediction-card h2 { margin:11px 0 0; font-size:19px; letter-spacing:-.025em; line-height:1.35; }
.prediction-card-head p { margin:7px 0 0; color:#7C879A; font-size:10.5px; line-height:1.6; }
.prediction-countdown { flex:0 0 auto; border:1px solid rgba(41,224,201,.25); border-radius:8px; background:rgba(41,224,201,.06); color:#29E0C9; padding:9px 11px; font:800 10px/1 var(--font-mono); white-space:nowrap; }
.prediction-pool-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; margin-top:17px; }
.prediction-pool-strip > div { min-width:0; padding:10px 11px; border:1px solid #242D3C; border-radius:8px; background:#0B1017; }
.prediction-pool-strip span { display:block; color:#5F6B7F; font-size:8.5px; margin-bottom:5px; }
.prediction-pool-strip strong { color:#DDE4ED; font:800 12px/1 var(--font-mono); }
.prediction-pool-strip > div:first-child strong { color:#FFC857; }
.prediction-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:14px; }
.prediction-option { position:relative; width:100%; text-align:left; border:1px solid #283244; border-radius:10px; background:#0B1017; color:#DCE3EC; padding:12px; transition:.15s ease; }
.prediction-option:not(:disabled):hover { transform:translateY(-1px); border-color:#4B5972; background:#111824; }
.prediction-option:disabled { cursor:default; opacity:1; }
.prediction-option.mine { border-color:rgba(255,200,87,.42); background:linear-gradient(110deg,rgba(255,200,87,.07),#0B1017 52%); }
.prediction-option.winner { border-color:rgba(41,224,201,.48); box-shadow:inset 0 0 0 1px rgba(41,224,201,.08); }
.prediction-option-top, .prediction-option-bottom { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.prediction-option-top strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11.5px; }
.prediction-option-top span { color:#AAB4C4; font:800 10px/1 var(--font-mono); }
.prediction-option-bar { height:4px; margin:10px 0 7px; border-radius:999px; overflow:hidden; background:#1E2633; }
.prediction-option-bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#29E0C9,#7A3EFF); }
.prediction-option-bottom { color:#626E81; font-size:8.5px; }
.prediction-option-bottom span:last-child { color:#8D99AC; font-weight:800; }
.prediction-option em, .prediction-option b { position:absolute; top:9px; right:58px; border-radius:999px; padding:2px 6px; font-size:7.5px; font-style:normal; font-weight:900; }
.prediction-option em { color:#FFC857; background:rgba(255,200,87,.10); }
.prediction-option b { right:9px; color:#29E0C9; background:rgba(41,224,201,.10); }
.prediction-my-position { margin-top:11px; display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid rgba(255,200,87,.22); border-radius:9px; background:rgba(255,200,87,.045); }
.prediction-my-position span { color:#7B8799; font-size:8.5px; }
.prediction-my-position strong { color:#E5EAF1; font-size:10px; }
.prediction-my-position b { margin-left:auto; color:#FFC857; font:800 10px/1 var(--font-mono); }
.prediction-my-result { margin-top:11px; min-height:52px; display:flex; align-items:center; gap:12px; border:1px solid #293344; border-radius:9px; background:#0B1017; padding:9px 12px; }
.prediction-my-result span { color:#788496; font-size:9px; }
.prediction-my-result strong { color:#E8EDF4; font:900 15px/1 var(--font-mono); }
.prediction-my-result small { color:#626E80; font-size:8.5px; }
.prediction-my-result.win { border-color:rgba(41,224,201,.28); background:rgba(41,224,201,.045); }
.prediction-my-result.win strong { color:#29E0C9; }
.prediction-my-result.lose strong { color:#FF739E; }
.prediction-my-result.claimed strong { color:#AEB8C7; }
.prediction-claim-btn { margin-left:auto; min-height:34px; border:0; border-radius:7px; padding:0 13px; background:#29E0C9; color:#05070C; font-size:9.5px; font-weight:900; }
.prediction-claim-btn:disabled { opacity:.55; cursor:wait; }
.prediction-result-banner { margin-top:13px; display:grid; grid-template-columns:auto 1fr; gap:3px 12px; align-items:center; border:1px solid rgba(41,224,201,.25); border-radius:9px; background:rgba(41,224,201,.055); padding:10px 12px; }
.prediction-result-banner span { color:#6F7B8D; font-size:8.5px; }
.prediction-result-banner strong { color:#29E0C9; font-size:12px; }
.prediction-result-banner small { grid-column:2; color:#6E7A8C; font-size:8.5px; }
.prediction-result-banner.refund { border-color:rgba(255,200,87,.24); background:rgba(255,200,87,.04); }
.prediction-result-banner.refund strong { color:#FFC857; }
.prediction-card-foot { margin-top:10px; color:#596578; font-size:8.5px; }
.prediction-bet-modal { width:min(460px,calc(100vw - 24px)); }
.prediction-bet-modal h3 { margin:0 0 14px; font-size:16px; line-height:1.4; }
.prediction-bet-choice { display:flex; align-items:center; gap:9px; padding:11px; border:1px solid rgba(255,200,87,.24); border-radius:8px; background:rgba(255,200,87,.05); margin-bottom:7px; }
.prediction-bet-choice span { color:#707C8F; font-size:9px; }
.prediction-bet-choice strong { color:#FFC857; font-size:11px; }
.prediction-bet-choice em { margin-left:auto; color:#8D98A9; font-size:8.5px; font-style:normal; }
.prediction-bet-limits { color:#647084; font-size:8.5px; line-height:1.5; margin-bottom:14px; }
.prediction-bet-input { width:100%; margin-top:6px; background:#090D14; border:1px solid #30394B; border-radius:8px; padding:11px 12px; color:#EDF2F8; font:800 16px/1 var(--font-mono); }
.prediction-quick-bets { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin:8px 0 13px; }
.prediction-quick-bets button { min-height:31px; border:1px solid #293345; border-radius:7px; background:#0D121A; color:#8D98AA; font-size:9px; font-weight:800; }
.prediction-quick-bets button:hover { color:#DDE4ED; border-color:#455168; }

@media (max-width: 760px) {
  .prediction-layout { padding:18px 12px 86px; }
  .prediction-hero { flex-direction:column; align-items:flex-start; padding:19px 17px; }
  .prediction-rule-chips { justify-content:flex-start; }
  .prediction-toolbar { align-items:stretch; flex-direction:column; }
  .prediction-tabs { display:grid; grid-template-columns:repeat(3,1fr); }
  .prediction-tab { padding:0 6px; }
  .prediction-card { padding:15px 13px; }
  .prediction-card-head { flex-direction:column; gap:10px; }
  .prediction-countdown { align-self:flex-start; }
  .prediction-pool-strip { grid-template-columns:repeat(2,1fr); }
  .prediction-options { grid-template-columns:1fr; }
  .prediction-my-result { flex-wrap:wrap; }
  .prediction-claim-btn { width:100%; margin-left:0; }
}

/* ===== My Info · Google unlink danger button polish ===== */
#myInfoGoogleUnlinkBtn {
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(255, 91, 126, .58) !important;
  border-radius: 8px;
  background: rgba(255, 65, 108, .09) !important;
  color: #ff8fab !important;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
#myInfoGoogleUnlinkBtn:hover {
  background: rgba(255, 65, 108, .16) !important;
  border-color: rgba(255, 112, 143, .9) !important;
  color: #ffd7e1 !important;
}
#myInfoGoogleUnlinkBtn:active {
  transform: translateY(1px);
}
#myInfoGoogleUnlinkBtn[hidden] { display: none !important; }

/* Google settings card: make the primary status button and destructive action read as one tidy stack. */
.my-info-settings-block #myInfoGoogleBtn {
  flex: 1 1 100%;
  width: 100%;
}
.my-info-settings-block #myInfoGoogleUnlinkBtn {
  flex: 1 1 100%;
}

/* =====================================================================
   메인 2차 개편 — 종목 점진 노출 / 투자자 한줄평 통합 피드 / 모바일 뉴스 강화
   ===================================================================== */
.stock-more-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 6px 4px;
  color: #667185;
  font: 600 10.5px/1.3 var(--font-mono);
}
.stock-more-control[hidden] { display: none !important; }
.stock-more-control button {
  min-width: 92px;
  padding: 7px 13px;
  border: 1px solid #30384A;
  border-radius: 7px;
  background: #111722;
  color: #AAB4C4;
  font-size: 11px;
  font-weight: 800;
}
.stock-more-control button:hover {
  border-color: rgba(41,224,201,.58);
  color: #29E0C9;
  background: rgba(41,224,201,.07);
}
.stock-more-control button[hidden] { display: none !important; }

.community-board {
  border-top: 1px solid #262C3B;
  background: #080B11;
  padding: 22px 24px 28px;
}
.community-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}
.community-kicker {
  display: block;
  margin-bottom: 4px;
  color: #29E0C9;
  font: 800 9.5px/1.2 var(--font-mono);
  letter-spacing: .1em;
}
.community-board-head h2 {
  margin: 0;
  color: #DDE4ED;
  font-size: 15px;
  line-height: 1.3;
}
.community-board-head p {
  margin: 5px 0 0;
  color: #626D80;
  font-size: 10.5px;
}
.community-count {
  color: #647084;
  font: 700 10px/1.2 var(--font-mono);
  white-space: nowrap;
}
.community-feed {
  overflow: hidden;
  border: 1px solid #202736;
  border-radius: 10px;
  background: #0B0F16;
}
.community-feed-item {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(170px, 220px) minmax(0, 1fr) 74px;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 9px 13px;
  border-bottom: 1px solid #171D28;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}
.community-feed-item:last-child { border-bottom: 0; }
.community-feed-item:hover,
.community-feed-item:focus-visible {
  outline: none;
  background: #111722;
}
.community-stock,
.community-author {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.community-stock strong,
.community-author > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.community-stock strong { color: #E4EAF2; font-size: 11.5px; }
.community-stock-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  background: #171D28;
}
.community-stock-avatar.fallback {
  display: grid;
  place-items: center;
  color: #11151C;
  font-weight: 900;
  background: linear-gradient(135deg,#FF3E7F,#FFC857 48%,#29E0C9);
}
.community-author > span {
  color: #98A4B7;
  font-size: 10.5px;
  font-weight: 700;
}
.community-title-badge {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 6px;
  border: 1px solid rgba(255,200,87,.30);
  border-radius: 999px;
  background: rgba(255,200,87,.07);
  color: #FFC857;
  font: 800 8.5px/1.1 var(--font-mono);
}
.community-comment {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #D3DAE5;
  font-size: 11.5px;
}
.community-feed-item time {
  color: #586477;
  font: 600 9px/1.2 var(--font-mono);
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 760px) {
  /* 모바일은 기존 긴급속보 1줄을 유지하고, 바로 아래에 종목 현황을 배치합니다.
     종목 → 시장 뉴스 → 내 포트폴리오 순서이며 PC의 3열 배치는 건드리지 않습니다. */
  .layout .stock-panel { order: 1; }
  .layout .news-panel { order: 2; }
  .layout .side-panel { order: 3; }

  .layout .news-panel .news-feed {
    overflow: visible;
    max-height: none;
    gap: 7px;
  }
  .layout .news-panel .news-feed .news-item {
    padding: 9px 10px;
    font-size: 11.5px;
  }
  .layout .news-panel .news-feed .news-item:nth-child(n+6) {
    display: none;
  }
  .layout .news-panel .panel-head { margin-bottom: 10px; }

  .stock-more-control {
    padding: 12px 4px 2px;
  }
  .stock-more-control button {
    min-width: 100px;
    padding: 8px 12px;
  }

  .community-board {
    padding: 18px 14px 86px;
  }
  .community-board-head {
    align-items: flex-start;
    gap: 10px;
  }
  .community-board-head p { max-width: 250px; }
  /* 모바일은 카드 자체가 종목/작성자/내용/시간 구조라 PC용 열 제목이 오히려 혼란스럽습니다. */
  .community-feed-head { display: none !important; }
  .community-feed {
    border-radius: 9px;
  }
  .community-feed-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 10px;
    min-height: 0;
    padding: 12px 11px;
  }
  .community-stock {
    grid-column: 1;
    grid-row: 1;
  }
  .community-stock-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .community-author {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-left: 38px;
  }
  .community-comment {
    grid-column: 1 / -1;
    grid-row: 3;
    padding: 4px 0 1px 38px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.45;
  }
  .community-feed-item time {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  /* 모바일은 첫 화면 길이를 억제하기 위해 최신 10개만 노출. */
  .community-feed-item:nth-child(n+11) { display: none; }
}

/* =====================================================================
   메인 커뮤니티 위치 보정 — PC에서 종목 목록 높이에 밀리지 않도록 처리
   ===================================================================== */
@media (min-width: 761px) {
  /* 메인 3열은 한 화면 안에서 소비 가능한 높이로 제한합니다.
     종목/뉴스는 기존 내부 스크롤을 사용하고, 커뮤니티가 바로 다음 레이어에 노출됩니다. */
  .layout {
    height: calc(100vh - 230px);
    min-height: 520px;
    max-height: 820px;
  }

  .layout .side-panel {
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .community-board {
    padding-top: 18px;
  }

  .community-feed {
    max-height: 310px;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
}

/* ===== 연속 출석 퀘스트 보너스 ===== */
.quest-streak-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 18px 20px;
  border: 1px solid rgba(255,200,87,.28);
  background:
    radial-gradient(circle at 88% 10%, rgba(255,200,87,.09), transparent 34%),
    linear-gradient(145deg, rgba(20,18,16,.98), rgba(10,13,20,.98));
}
.quest-streak-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-left: 2px solid rgba(255,200,87,.7);
}
.quest-streak-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}
.quest-streak-kicker {
  display: block;
  margin-bottom: 5px;
  color: #8D7B57;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}
.quest-streak-head h2 { margin: 0; font-size: 17px; }
.quest-streak-head p { margin: 7px 0 0; color: #778195; font-size: 11.5px; line-height: 1.6; }
.quest-streak-head p b { color: #DCCB9B; }
.quest-streak-current {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 9px 12px;
  border: 1px solid rgba(255,200,87,.3);
  border-radius: 9px;
  background: rgba(255,200,87,.06);
  text-align: right;
}
.quest-streak-current span { display: block; color: #988967; font-size: 10px; font-weight: 700; }
.quest-streak-current strong { display: block; margin-top: 2px; color: #FFC857; font: 900 21px/1 var(--font-mono); }
.quest-streak-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 15px;
}
.quest-streak-steps > div {
  position: relative;
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid #252C3A;
  border-radius: 8px;
  background: #10151E;
  text-align: center;
  transition: border-color .2s, background .2s, transform .2s;
}
.quest-streak-steps > div span { display: block; color: #667185; font-size: 9px; }
.quest-streak-steps > div strong { display: block; margin-top: 3px; color: #A8B0BE; font: 800 12px/1 var(--font-mono); }
.quest-streak-steps > div.is-past { border-color: rgba(255,200,87,.15); background: rgba(255,200,87,.025); }
.quest-streak-steps > div.is-past strong { color: #A8915B; }
.quest-streak-steps > div.is-current {
  transform: translateY(-2px);
  border-color: rgba(255,200,87,.62);
  background: rgba(255,200,87,.10);
  box-shadow: 0 7px 20px rgba(0,0,0,.22), inset 0 0 18px rgba(255,200,87,.04);
}
.quest-streak-steps > div.is-current span { color: #D9C99E; }
.quest-streak-steps > div.is-current strong { color: #FFC857; }
.quest-streak-next {
  position: relative;
  margin-top: 10px;
  color: #9B8A68;
  font-size: 10.5px;
  text-align: right;
}
.daily-reward-streak-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 13px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(255,200,87,.24);
  border-radius: 8px;
  background: rgba(255,200,87,.055);
  font-size: 10.5px;
}
.daily-reward-streak-info span { color: #9B8A68; }
.daily-reward-streak-info strong { color: #FFC857; white-space: nowrap; }

@media (max-width: 560px) {
  .quest-streak-panel { padding: 15px 13px; }
  .quest-streak-head { gap: 10px; }
  .quest-streak-head h2 { font-size: 15px; }
  .quest-streak-head p { font-size: 10.5px; }
  .quest-streak-current { min-width: 78px; padding: 8px 9px; }
  .quest-streak-current strong { font-size: 18px; }
  .quest-streak-steps { gap: 4px; }
  .quest-streak-steps > div { padding: 8px 3px; }
  .quest-streak-steps > div span { font-size: 8px; }
  .quest-streak-steps > div strong { font-size: 10px; }
  .quest-streak-next { font-size: 9.5px; }
  .daily-reward-streak-info { display: block; text-align: center; }
  .daily-reward-streak-info strong { display: block; margin-top: 3px; }
}

/* =====================================================================
   농장 — 10분 생산 / 10칸 고정 / 열매 창고 200 / 1시간 농산물 시세
   ===================================================================== */
.farm-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 18px 110px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.farm-layout .panel { border: 1px solid #202736; border-radius: 12px; }
.farm-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  margin-bottom: 16px;
}
.farm-panel-head h1 { margin: 2px 0 5px; font-size: 22px; letter-spacing: -0.02em; }
.farm-panel-head p { margin: 0; color: #778195; font-size: 11.5px; line-height: 1.55; }
.farm-kicker { color: #29E0C9; font: 800 9px/1.2 var(--font-mono); letter-spacing: .12em; }
.farm-market-panel { background: linear-gradient(180deg, rgba(41,224,201,.035), #0A0D14 32%); }
.farm-market-clock {
  min-width: 165px; padding: 11px 12px; border: 1px solid rgba(41,224,201,.22); border-radius: 9px;
  background: rgba(41,224,201,.045); text-align: right;
}
.farm-market-clock span { display: block; color: #7A8699; font-size: 9.5px; }
.farm-market-clock strong { display: block; margin-top: 3px; color: #29E0C9; font: 900 22px/1.1 var(--font-mono); }
.farm-market-clock button, .farm-plot-tools button {
  margin-top: 8px; border: 1px solid #2A3344; border-radius: 7px; background: #121823; color: #AEB7C6;
  padding: 6px 9px; font-size: 10px; font-weight: 700;
}
.farm-market-clock button:hover, .farm-plot-tools button:hover:not(:disabled) { border-color: #29E0C9; color: #29E0C9; }
.farm-market-panel.market-closed {
  background: linear-gradient(180deg, rgba(255,200,87,.035), #0A0D14 32%);
}
.farm-market-panel.market-closed .farm-market-clock {
  border-color: rgba(255,200,87,.28);
  background: rgba(255,200,87,.045);
}
.farm-market-panel.market-closed .farm-market-clock strong { color:#FFC857; }
.farm-market-warning {
  margin: -3px 0 12px; padding: 9px 11px; border: 1px solid rgba(255,200,87,.32); border-radius: 8px;
  background: rgba(255,200,87,.07); color: #D8C18B; font-size: 10.5px; line-height: 1.5;
}
.farm-market-warning.closed {
  border-color: rgba(122,134,153,.34);
  background: rgba(122,134,153,.07);
  color: #AAB3C1;
}
.farm-market-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.farm-market-card {
  min-width: 0; padding: 11px; border: 1px solid #222938; border-radius: 9px; background: #10151E;
  position: relative; overflow: hidden;
}
.farm-market-card::before { content:""; position:absolute; inset:0 auto 0 0; width:2px; background:#4B5567; opacity:.7; }
.farm-market-card.up::before { background:#29E0C9; }
.farm-market-card.down::before { background:#FF3E7F; }
.farm-market-crop { display:flex; align-items:center; gap:7px; min-width:0; }
.farm-market-crop strong { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.farm-emoji { font-size:21px; line-height:1; }
.farm-market-price { margin-top:9px; color:#E7EDF6; font:900 16px/1 var(--font-mono); }
.farm-market-change { margin-top:5px; font:800 9.5px/1 var(--font-mono); color:#737D8F; }
.farm-market-change.up { color:#29E0C9; }
.farm-market-change.down { color:#FF3E7F; }
.farm-supply { display:inline-block; margin-top:8px; padding:3px 6px; border-radius:20px; font-size:8.5px; font-weight:800; border:1px solid #303849; color:#7F899B; }
.farm-supply.scarce { color:#FFC857; border-color:rgba(255,200,87,.34); background:rgba(255,200,87,.06); }
.farm-supply.low { color:#B7D97B; border-color:rgba(183,217,123,.25); }
.farm-supply.normal { color:#29E0C9; border-color:rgba(41,224,201,.24); }
.farm-supply.high { color:#FF9B68; border-color:rgba(255,155,104,.26); }
.farm-supply.flood { color:#FF3E7F; border-color:rgba(255,62,127,.32); background:rgba(255,62,127,.05); }

.farm-two-col { display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
.farm-help { color:#6F798A; font-size:10px; line-height:1.55; margin:-4px 0 12px; }
.farm-seed-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:7px; }
.farm-seed-card { border:1px solid #222938; border-radius:9px; background:#10151E; overflow:hidden; }
.farm-seed-card.selected { border-color:rgba(41,224,201,.55); box-shadow:inset 0 0 18px rgba(41,224,201,.035); }
.farm-seed-select {
  width:100%; display:grid; grid-template-columns: 30px 1fr auto; align-items:center; gap:8px; text-align:left;
  background:transparent; border:0; color:#E6EBF3; padding:9px 9px 7px;
}
.farm-seed-select strong { display:block; font-size:11px; }
.farm-seed-select small { display:block; margin-top:3px; color:#707B8D; font-size:8.5px; }
.farm-seed-select em { color:#657084; font-size:8.5px; font-style:normal; font-weight:800; }
.farm-seed-card.selected .farm-seed-select em { color:#29E0C9; }
.farm-seed-actions { display:grid; grid-template-columns:repeat(3,1fr); border-top:1px solid #1B2130; }
.farm-seed-actions button { border:0; border-right:1px solid #1B2130; background:#0C1119; color:#8792A4; padding:6px; font-size:9px; font-weight:800; }
.farm-seed-actions button:last-child { border-right:0; }
.farm-seed-actions button:hover:not(:disabled) { color:#29E0C9; background:#111923; }
.farm-seed-actions button:disabled { opacity:.25; cursor:not-allowed; }

.farm-capacity { height:6px; border-radius:999px; background:#171D28; overflow:hidden; margin:-2px 0 12px; }
.farm-capacity > div { height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,#29E0C9,#FFC857); transition:width .25s; }
.farm-inventory-list { display:flex; flex-direction:column; gap:5px; }
.farm-inventory-row { display:grid; grid-template-columns:1.1fr 52px 115px 150px; gap:8px; align-items:center; padding:7px 8px; border:1px solid #202735; border-radius:8px; background:#10151E; }
.farm-inventory-row.empty { opacity:.42; }
.farm-inventory-name { display:flex; align-items:center; gap:6px; min-width:0; }
.farm-inventory-name span { font-size:17px; }
.farm-inventory-name strong { font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.farm-inventory-qty { color:#E8EDF5; font:800 10px/1 var(--font-mono); text-align:right; }
.farm-inventory-value { color:#778195; font-size:9px; text-align:right; }
.farm-inventory-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:4px; }
.farm-inventory-actions button { border:1px solid #2A3344; border-radius:6px; background:#111722; color:#99A3B4; padding:5px 3px; font-size:8.5px; font-weight:800; }
.farm-inventory-actions button:hover:not(:disabled) { border-color:#29E0C9; color:#29E0C9; }
.farm-inventory-actions button:disabled { opacity:.25; }

.farm-plot-head { align-items:center; }
.farm-plot-tools { display:flex; align-items:center; justify-content:flex-end; gap:7px; flex-wrap:wrap; }
.farm-plot-tools > span { color:#7C8798; font-size:9.5px; margin-right:3px; }
.farm-plot-tools > span strong { color:#FFC857; }
.farm-plot-tools button { margin-top:0; }
.farm-plot-tools button:disabled { opacity:.32; }
.farm-plot-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; }
.farm-plot { min-height:148px; border:1px solid #252D3C; border-radius:10px; background:linear-gradient(180deg,#111721,#0E131B); padding:10px; text-align:center; position:relative; display:flex; flex-direction:column; align-items:center; }
.farm-plot-no { position:absolute; top:7px; left:8px; color:#4F596C; font:800 8px/1 var(--font-mono); }
.farm-plot-ground { width:62px; height:62px; margin:6px auto 7px; border-radius:50%; display:grid; place-items:center; background:radial-gradient(circle at 50% 60%,#352A1D 0 42%,#221B15 43% 61%,#14181E 62%); font-size:31px; box-shadow:inset 0 -8px 15px rgba(0,0,0,.28); }
.farm-plot.empty .farm-plot-ground { color:#566173; font-size:24px; }
.farm-plot.ready { border-color:rgba(255,200,87,.38); box-shadow:inset 0 0 20px rgba(255,200,87,.035); }
.farm-plot.ready .farm-plot-ground { animation:farmReadyPulse 1.3s ease-in-out infinite alternate; }
@keyframes farmReadyPulse { from { transform:translateY(0); box-shadow:0 0 0 rgba(255,200,87,0); } to { transform:translateY(-2px); box-shadow:0 0 18px rgba(255,200,87,.18); } }
.farm-plot strong { font-size:11px; }
.farm-plot-timer { margin-top:4px; color:#29E0C9; font:800 10px/1 var(--font-mono); }
.farm-plot-timer.ready { color:#FFC857; }
.farm-plot button { margin-top:auto; width:100%; border:1px solid #2B3444; border-radius:7px; background:#141B26; color:#A2ADBD; padding:6px; font-size:9px; font-weight:800; }
.farm-plot button:hover:not(:disabled) { border-color:#29E0C9; color:#29E0C9; }
.farm-plot.ready button { border-color:rgba(255,200,87,.35); color:#FFC857; }
.farm-plot button:disabled { opacity:.38; }
.farm-msg { min-height:22px; color:#8A95A7; font-size:10.5px; text-align:center; padding:3px 10px; }
.farm-msg.success { color:#29E0C9; }
.farm-msg.error { color:#FF6B8F; }

@media (max-width: 980px) {
  .farm-market-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .farm-market-grid .farm-market-card:last-child { grid-column:span 2; }
  .farm-two-col { grid-template-columns:1fr; }
  .farm-plot-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .farm-layout { padding:12px 10px 105px; gap:10px; }
  .farm-layout .panel { padding:14px 12px; }
  .farm-panel-head { display:block; }
  .farm-panel-head h1 { font-size:18px; }
  .farm-market-clock { margin-top:10px; min-width:0; text-align:left; display:grid; grid-template-columns:1fr auto; align-items:center; gap:2px 10px; }
  .farm-market-clock span { grid-column:1; }
  .farm-market-clock strong { grid-column:1; font-size:19px; }
  .farm-market-clock button { grid-column:2; grid-row:1 / span 2; margin:0; }
  .farm-market-grid { gap:6px; }
  .farm-market-card { padding:9px; }
  .farm-market-price { font-size:14px; }
  .farm-seed-grid { grid-template-columns:1fr; }
  .farm-inventory-row { grid-template-columns:1fr 46px 95px; }
  .farm-inventory-actions { grid-column:1 / -1; }
  .farm-plot-head { display:block; }
  .farm-plot-tools { margin-top:10px; justify-content:flex-start; }
  .farm-plot-grid { gap:7px; }
  .farm-plot { min-height:139px; padding:8px; }
  .farm-plot-ground { width:55px; height:55px; font-size:27px; }
}

/* ===== 평판 시스템 ===== */
.news-reputation-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.news-reputation-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid rgba(183,155,255,0.18);
  border-radius: 999px;
  background: rgba(183,155,255,0.07);
  color: #B79BFF;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.news-reputation-chip.pos {
  border-color: rgba(41,224,201,0.22);
  background: rgba(41,224,201,0.07);
  color: #29E0C9;
}
.news-reputation-chip.neg {
  border-color: rgba(255,62,127,0.22);
  background: rgba(255,62,127,0.07);
  color: #FF3E7F;
}

.reputation-panel {
  margin-top: 18px;
  padding: 15px 16px 14px;
  border: 1px solid #1C2230;
  border-radius: 10px;
  background: #0D111A;
}
.reputation-panel .panel-head { margin-bottom: 12px; }
.reputation-panel .panel-head h2 { font-size: 14px; }
.reputation-total {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(183,155,255,0.26);
  border-radius: 999px;
  background: rgba(183,155,255,0.08);
  color: #C7B4FF;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
}
.reputation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.reputation-item { min-width: 0; }
.reputation-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.reputation-label {
  overflow: hidden;
  color: #B8C2D4;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reputation-score {
  flex-shrink: 0;
  color: #EAEEF5;
  font-family: var(--font-mono);
  font-size: 11px;
}
.reputation-bar {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #171B26;
}
.reputation-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7A3EFF 0%, #B79BFF 55%, #29E0C9 100%);
  transition: width .25s ease;
}
.reputation-note {
  margin: 11px 0 0;
  color: #5C6478;
  font-size: 10px;
  line-height: 1.5;
}
.detail-news-feed .news-reputation-effects { margin-top: 5px; }
.detail-news-feed .news-reputation-chip { min-height: 18px; padding: 2px 5px; font-size: 8.5px; }

@media (max-width: 560px) {
  .reputation-panel { padding: 13px 12px; }
  .reputation-grid { grid-template-columns: 1fr; gap: 8px; }
  .reputation-note { font-size: 9.5px; }
}

/* ===== 뉴스 · 부동산 영향 ===== */
.news-property-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.news-property-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid rgba(255,200,87,0.22);
  border-radius: 999px;
  background: rgba(255,200,87,0.07);
  color: #FFC857;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.news-property-chip.pos { border-color: rgba(41,224,201,.22); color: #29E0C9; background: rgba(41,224,201,.06); }
.news-property-chip.neg { border-color: rgba(255,62,127,.22); color: #FF3E7F; background: rgba(255,62,127,.06); }
.detail-news-feed .news-property-effects { margin-top: 5px; }
.detail-news-feed .news-property-chip { min-height: 18px; padding: 2px 5px; font-size: 8.5px; }
.re-card-event {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 900;
  vertical-align: middle;
}
.re-card-event.up { color: #29E0C9; background: rgba(41,224,201,.08); border: 1px solid rgba(41,224,201,.18); }
.re-card-event.down { color: #FF3E7F; background: rgba(255,62,127,.08); border: 1px solid rgba(255,62,127,.18); }

/* ===== 부동산 · 지역 평판 ===== */
.region-reputation-panel {
  margin: 0 0 18px;
  padding: 15px 16px;
  border: 1px solid #1C2230;
  border-radius: 11px;
  background: #0D111A;
}
.region-rep-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:13px; }
.region-rep-head strong { display:block; margin-top:3px; color:#EAEEF5; font-size:15px; }
.region-rep-head p { margin:4px 0 0; color:#667086; font-size:10.5px; line-height:1.5; }
.region-rep-guide,.region-rep-total {
  flex-shrink:0; display:inline-flex; align-items:center; min-height:25px; padding:3px 9px;
  border:1px solid rgba(41,224,201,.22); border-radius:999px; background:rgba(41,224,201,.06);
  color:#29E0C9; font-family:var(--font-mono); font-size:10px; font-weight:900;
}
.region-rep-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.region-rep-summary-card {
  min-width:0; padding:11px 12px; text-align:left; border:1px solid #202738; border-radius:9px;
  background:#111620; color:#EAEEF5; cursor:pointer; transition:border-color .15s ease,background .15s ease;
}
.region-rep-summary-card:hover { border-color:rgba(41,224,201,.38); background:#131A24; }
.region-rep-summary-name { display:block; color:#B8C2D4; font-size:11px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.region-rep-summary-score { display:flex; align-items:baseline; gap:6px; margin-top:5px; color:#EAEEF5; font-family:var(--font-mono); font-size:18px; font-weight:900; }
.region-rep-summary-score b { color:#29E0C9; font-size:10px; }
.region-rep-summary-traits { display:block; margin-top:5px; color:#626D82; font-size:8.5px; line-height:1.45; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.region-rep-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 16px; }
.region-rep-item { min-width:0; }
.region-rep-item-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:5px; color:#B8C2D4; font-size:10.5px; font-weight:700; }
.region-rep-item-head b { color:#EAEEF5; font-family:var(--font-mono); font-size:10.5px; }
.region-rep-bar { height:5px; overflow:hidden; border-radius:999px; background:#171B26; }
.region-rep-bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7A3EFF 0%,#29E0C9 100%); transition:width .25s ease; }
@media (max-width:900px) { .region-rep-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) {
  .region-reputation-panel { padding:13px 12px; }
  .region-rep-head { display:block; }
  .region-rep-guide,.region-rep-total { margin-top:8px; }
  .region-rep-summary-grid,.region-rep-detail-grid { grid-template-columns:1fr; }
}

/* 뉴스 · 지역 평판 영향 */
.news-region-reputation-effects { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
.news-region-reputation-chip {
  display:inline-flex; align-items:center; min-height:20px; padding:2px 6px; border-radius:999px;
  border:1px solid rgba(41,224,201,.18); background:rgba(41,224,201,.05); color:#7EF2E3;
  font-family:var(--font-mono); font-size:9.5px; font-weight:800; line-height:1.2; white-space:nowrap;
}
.news-region-reputation-chip.pos { color:#29E0C9; border-color:rgba(41,224,201,.24); }
.news-region-reputation-chip.neg { color:#FF3E7F; border-color:rgba(255,62,127,.22); background:rgba(255,62,127,.06); }
.detail-news-feed .news-region-reputation-chip { min-height:18px; padding:2px 5px; font-size:8.5px; }
.re-card-region-rep { margin-left:5px; color:#29E0C9; font-family:var(--font-mono); font-size:8.5px; font-weight:800; }

/* =====================================================================
   기업 인수 / 경매 / 모델 운영
   기존 기업(회차 업적) UI를 보존하고 상세 상단에만 확장합니다.
   ===================================================================== */
.company-layout { max-width: 1060px; }
.club-card-topline { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.company-status { display:inline-flex; align-items:center; flex-shrink:0; padding:3px 7px; border:1px solid #303848; border-radius:999px; font-size:9px; font-weight:800; letter-spacing:.02em; color:#8792A5; }
.company-status.off { color:#6B7589; }
.company-status.ready { color:#FFC857; border-color:rgba(255,200,87,.28); background:rgba(255,200,87,.05); }
.company-status.auction { color:#29E0C9; border-color:rgba(41,224,201,.32); background:rgba(41,224,201,.06); }
.company-status.owned { color:#B79BFF; border-color:rgba(183,155,255,.32); background:rgba(183,155,255,.06); }
.club-card-auction { margin-top:9px; padding-top:8px; border-top:1px solid #222938; color:#29E0C9; font-size:10.5px; font-family:var(--font-mono); }

.company-section, .company-record-panel { border:1px solid #252D3C; background:#0E121A; border-radius:11px; }
.company-section { padding:16px; margin-bottom:14px; }
.company-section.company-disabled { color:#778297; }
.company-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:12px; border-bottom:1px solid #202736; }
.company-section-head h3 { margin:0; font-size:15px; color:#EEF3FA; }
.company-section-head p { margin:4px 0 0; color:#697488; font-size:10.5px; }
.company-owner-card { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:12px; }
.company-owner-card > div, .company-stats > div { border:1px solid #232B3A; background:#0A0D14; border-radius:8px; padding:9px 10px; min-width:0; }
.company-owner-card span, .company-stats span, .company-auction-grid span { display:block; color:#697488; font-size:9px; margin-bottom:4px; }
.company-owner-card strong, .company-stats strong, .company-auction-grid strong { display:block; color:#E7ECF4; font-size:12px; word-break:break-word; }
.company-subsection { margin-top:14px; padding-top:14px; border-top:1px solid #202736; }
.company-subhead { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.company-subhead h4 { margin:0; font-size:13px; color:#E8EDF5; }
.company-subhead > span { color:#626E82; font-size:9.5px; }
.company-live { color:#29E0C9 !important; font-family:var(--font-mono); font-weight:800; }
.company-current-model { display:flex; align-items:center; gap:12px; border:1px solid rgba(41,224,201,.2); background:rgba(41,224,201,.035); border-radius:9px; padding:11px; }
.company-current-model > div:last-child { display:flex; flex-direction:column; gap:3px; min-width:0; }
.company-current-model strong { color:#EDF3FA; font-size:14px; }
.company-current-model span { color:#7D899C; font-size:10px; }
.company-model-avatar { width:54px; height:54px; border-radius:9px; object-fit:cover; background:#171D28; flex-shrink:0; }
.company-avatar-fallback { display:flex; align-items:center; justify-content:center; color:#9AA5B7; font-weight:800; }
.company-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:9px; }
.company-muted { margin:8px 0 0; color:#737F93; font-size:10.5px; line-height:1.55; }

.company-auction-box { margin-top:12px; padding:13px; border:1px solid rgba(41,224,201,.28); background:linear-gradient(180deg,rgba(41,224,201,.045),rgba(10,13,20,.5)); border-radius:9px; }
.company-auction-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.company-auction-title strong { color:#EEF3FA; font-size:13px; }
.company-auction-title span { color:#29E0C9; font-size:9px; font-family:var(--font-mono); font-weight:800; }
.company-auction-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.company-auction-grid > div { padding:8px 9px; background:#0A0D14; border:1px solid #222B39; border-radius:7px; min-width:0; }
.company-my-bid { margin-top:9px; border:1px solid rgba(255,200,87,.28); background:rgba(255,200,87,.06); color:#FFC857; border-radius:7px; padding:8px 10px; font-size:10.5px; }
.company-bid-row, .company-resale-form { display:flex; gap:7px; margin-top:10px; }
.company-bid-row input, .company-resale-form input, .company-resale-form select { min-width:0; height:36px; border:1px solid #30394B; background:#090C12; color:#E6EBF3; border-radius:7px; padding:0 10px; font-family:inherit; }
.company-bid-row input { flex:1; }
.company-bid-hint { margin-top:6px; color:#68758A; font-size:9.5px; }
.company-bid-blocked { margin-top:7px; color:#FF8BA6; font-size:10px; }
.company-auction-empty { margin-top:12px; display:flex; flex-direction:column; gap:3px; padding:12px; background:#0A0D14; border:1px dashed #2C3545; border-radius:8px; }
.company-auction-empty strong { color:#FFC857; font-size:12px; }
.company-auction-empty span { color:#6D798D; font-size:10.5px; }

.company-primary-btn, .company-danger-btn { flex-shrink:0; border-radius:7px; padding:0 13px; min-height:36px; border:1px solid rgba(41,224,201,.36); background:rgba(41,224,201,.09); color:#29E0C9; font-family:inherit; font-size:11px; font-weight:800; cursor:pointer; }
.company-danger-btn { border-color:rgba(255,62,127,.35); background:rgba(255,62,127,.08); color:#FF6B98; }
.company-primary-btn:disabled, .company-danger-btn:disabled { opacity:.45; cursor:not-allowed; }
.company-owner-tools { margin-top:10px; }
.company-warning { border:1px solid rgba(255,200,87,.22); background:rgba(255,200,87,.055); color:#C8B67F; border-radius:7px; padding:9px 10px; line-height:1.55; font-size:10px; }
.company-candidate-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:9px; }
.company-candidate { display:flex; align-items:center; gap:9px; min-width:0; padding:9px; border:1px solid #2A3343; background:#0A0D14; border-radius:8px; cursor:pointer; color:#DDE4EF; font-family:inherit; text-align:left; }
.company-candidate:hover { border-color:#29E0C9; }
.company-candidate-avatar { width:42px; height:42px; border-radius:7px; object-fit:cover; background:#161C27; flex-shrink:0; }
.company-candidate strong { flex:1; min-width:0; font-size:11.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.company-candidate span { color:#29E0C9; font-size:9px; flex-shrink:0; }
.company-lock-note { margin-top:7px; color:#FF9EB5; font-size:10px; }
.company-resale-box { margin-top:14px; padding-top:13px; border-top:1px solid #202736; }
.company-resale-box > div:first-child { display:flex; flex-direction:column; gap:3px; }
.company-resale-box > div:first-child strong { color:#E8EDF5; font-size:12px; }
.company-resale-box > div:first-child span { color:#6D798C; font-size:10px; }
.company-resale-form input { flex:1; }
.company-resale-form select { width:110px; }
.company-action-msg { min-height:0; margin:8px 0 0; font-size:10.5px; }
.company-action-msg.success { color:#29E0C9; }
.company-action-msg.error { color:#FF6B8A; }

.company-records { margin:0 0 18px; }
.company-record-grid { display:grid; grid-template-columns:1.25fr .75fr; gap:10px; }
.company-record-panel { padding:13px; min-width:0; }
.company-timeline-panel { margin-top:10px; }
.company-history-item { display:flex; align-items:center; gap:9px; padding:8px 0; border-bottom:1px solid #191F2A; }
.company-history-item:last-child, .company-owner-history-row:last-child, .company-timeline-row:last-child { border-bottom:none; }
.company-history-model-avatar { width:34px; height:34px; border-radius:7px; object-fit:cover; background:#171D28; flex-shrink:0; }
.company-history-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.company-history-main strong { color:#E7EDF5; font-size:11.5px; }
.company-history-main span { color:#69768A; font-size:9.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.company-history-main .company-history-candidates { color:#8B95A8; }
.company-history-result { text-align:right; flex-shrink:0; }
.company-history-result strong { display:block; color:#A7B1C1; font-size:11px; }
.company-history-result.up strong { color:#29E0C9; }
.company-history-result.down strong { color:#FF6B8A; }
.company-history-result span { display:block; margin-top:2px; color:#626E82; font-size:8.5px; }
.company-owner-history-row { display:flex; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid #191F2A; }
.company-owner-history-row > div { display:flex; flex-direction:column; gap:2px; }
.company-owner-history-row > div:last-child { text-align:right; }
.company-owner-history-row strong { color:#E2E8F1; font-size:11px; }
.company-owner-history-row span, .company-owner-history-row small { color:#697589; font-size:9px; }
.company-timeline-row { display:grid; grid-template-columns:145px 1fr; gap:10px; padding:7px 0; border-bottom:1px solid #191F2A; }
.company-timeline-row span { color:#657186; font-size:9.5px; font-family:var(--font-mono); }
.company-timeline-row strong { color:#C8D0DC; font-size:10.5px; font-weight:600; }
.company-achievement-divider { display:flex; align-items:center; gap:10px; margin:20px 0 14px; color:#697589; font-size:10px; font-weight:800; }
.company-achievement-divider::before, .company-achievement-divider::after { content:""; height:1px; background:#222936; flex:1; }

@media (max-width:760px) {
  .company-owner-card, .company-auction-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .company-record-grid { grid-template-columns:1fr; }
  .company-candidate-grid { grid-template-columns:1fr; }
  .company-candidate { padding:8px; }
  .company-timeline-row { grid-template-columns:1fr; gap:2px; }
}
@media (max-width:520px) {
  .company-section { padding:12px; }
  .company-section-head { flex-direction:column; }
  .company-bid-row, .company-resale-form { flex-direction:column; }
  .company-resale-form select { width:100%; }
  .company-primary-btn, .company-danger-btn { width:100%; }
  .club-card-topline { display:block; }
  .club-card-topline .company-status { margin-top:6px; }
}
.company-history-more {
  width:100%; margin-top:10px; padding:9px 12px; border:1px solid #2A3344; border-radius:8px;
  background:#111722; color:#AEB9C9; font-size:10.5px; font-weight:700; cursor:pointer;
}
.company-history-more:hover:not(:disabled) { border-color:#46536A; color:#E7EDF5; background:#151D2A; }
.company-history-more:disabled { opacity:.55; cursor:default; }

/* ===== 기업 인수 경매 회차 ===== */
.company-round-public { margin:0 0 14px; padding:14px; border:1px solid rgba(41,224,201,.24); border-radius:11px; background:linear-gradient(135deg,rgba(41,224,201,.055),rgba(122,62,255,.035) 58%,rgba(10,13,20,.72)); }
.company-round-public-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.company-round-kicker { display:block; color:#29E0C9; font-family:var(--font-mono); font-size:8.5px; font-weight:900; letter-spacing:.11em; }
.company-round-public-head h3 { margin:4px 0 0; color:#F0F4FA; font-size:15px; }
.company-round-public-head p { margin:4px 0 0; color:#69768A; font-size:9.5px; }
.company-round-public-status { flex-shrink:0; border-radius:999px; padding:4px 8px; font-family:var(--font-mono); font-size:8.5px; font-weight:900; }
.company-round-public-status.scheduled { color:#FFC857; background:rgba(255,200,87,.08); border:1px solid rgba(255,200,87,.2); }
.company-round-public-status.live { color:#29E0C9; background:rgba(41,224,201,.08); border:1px solid rgba(41,224,201,.22); }
.company-round-public-status.settling { color:#B79BFF; background:rgba(183,155,255,.08); border:1px solid rgba(183,155,255,.2); }
.company-round-public-status.ended,.company-round-public-status.cancelled { color:#778297; background:#141923; border:1px solid #252D3C; }
.company-round-public-timer { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:11px; padding:8px 10px; border:1px solid #222B39; border-radius:8px; background:#090D14; }
.company-round-public-timer span { color:#657186; font-size:9px; }
.company-round-public-timer strong { color:#29E0C9; font-family:var(--font-mono); font-size:11px; }
.company-round-public-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin-top:9px; }
.company-round-public-company { min-width:0; display:flex; flex-direction:column; gap:3px; text-align:left; padding:10px; border:1px solid #273142; border-radius:8px; background:#0A0D14; color:inherit; font-family:inherit; cursor:pointer; }
.company-round-public-company:hover { border-color:#29E0C9; background:#0D141B; }
.company-round-public-company span { color:#E4EAF2; font-size:11px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.company-round-public-company strong { color:#29E0C9; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.company-round-public-company small { color:#687489; font-size:8.5px; }
.company-round-public-note { margin:9px 0 0; color:#68758A; font-size:9.5px; line-height:1.5; }

@media (max-width:760px) {
  .company-round-public-grid { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .company-round-public { padding:11px; }
  .company-round-public-head { gap:8px; }
  .company-round-public-head h3 { font-size:13px; }
}

/* ===== 내 정보 · 정실 히스토리 ===== */
.my-info-spouse-history-showcase { grid-column:1 / -1; }
.my-info-spouse-history-summary {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:12px 0 10px;
}
.my-info-spouse-history-summary > div {
  min-width:0; min-height:62px; padding:11px 12px; border:1px solid #252E3E; border-radius:9px;
  background:linear-gradient(135deg,rgba(255,200,87,.055),#0A0F16 62%);
}
.my-info-spouse-history-summary span { display:block; color:#6F7A8D; font-size:9px; font-weight:700; }
.my-info-spouse-history-summary strong { display:block; margin-top:7px; color:#F2F5F9; font:900 15px/1 var(--font-mono); }
.my-info-spouse-history-list {
  display:flex; flex-direction:column; gap:6px; max-height:360px; overflow-y:auto; padding-right:2px;
}
.my-info-spouse-history-row {
  display:grid; grid-template-columns:48px minmax(0,1fr) 74px 62px; gap:10px; align-items:center;
  min-height:62px; padding:7px 11px 7px 7px; border:1px solid #252E3E; border-radius:10px;
  background:#0A0F16; color:inherit; text-decoration:none; transition:.15s ease;
}
.my-info-spouse-history-row:hover { border-color:#465268; transform:translateY(-1px); }
.my-info-spouse-history-row.current {
  border-color:rgba(255,200,87,.42);
  background:linear-gradient(95deg,rgba(255,200,87,.085),#0A0F16 45%);
}
.my-info-spouse-history-avatar {
  width:48px; height:48px; overflow:hidden; border-radius:8px; background:#171E29; display:block;
}
.my-info-spouse-history-avatar img { width:100%; height:100%; object-fit:cover; object-position:center 14%; display:block; }
.my-info-spouse-history-avatar i { width:100%; height:100%; display:block; background:linear-gradient(145deg,#1B2431,#10151D); }
.my-info-spouse-history-copy { min-width:0; }
.my-info-spouse-history-name { display:flex; align-items:center; gap:7px; min-width:0; }
.my-info-spouse-history-name strong { min-width:0; color:#E9EEF5; font-size:11.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.my-info-spouse-history-name b {
  flex-shrink:0; padding:3px 6px; border-radius:999px; background:rgba(255,200,87,.12); color:#FFC857;
  font-size:8px; line-height:1; font-weight:900;
}
.my-info-spouse-history-copy > small { display:block; margin-top:5px; color:#606C7E; font-size:8.5px; }
.my-info-spouse-history-days, .my-info-spouse-history-times { text-align:right; }
.my-info-spouse-history-days b, .my-info-spouse-history-times b { color:#F4F7FB; font:900 14px/1 var(--font-mono); }
.my-info-spouse-history-days small, .my-info-spouse-history-times small { margin-left:3px; color:#758094; font-size:9px; }
.my-info-spouse-history-times b { color:#FFC857; }
.my-info-spouse-history-empty {
  min-height:90px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:16px;
  border:1px dashed #2D3647; border-radius:10px; color:#8B96A8; text-align:center; font-size:10.5px;
}
.my-info-spouse-history-empty span { display:block; margin-top:5px; color:#626D7F; font-size:9px; }

@media (max-width: 820px) {
  .my-info-spouse-history-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .my-info-spouse-history-row { grid-template-columns:44px minmax(0,1fr) 58px 52px; gap:7px; padding-right:8px; }
  .my-info-spouse-history-avatar { width:44px; height:44px; }
  .my-info-spouse-history-copy > small { display:none; }
}
@media (max-width: 500px) {
  .my-info-spouse-history-row { grid-template-columns:42px minmax(0,1fr) auto; }
  .my-info-spouse-history-avatar { width:42px; height:42px; }
  .my-info-spouse-history-times { grid-column:3; grid-row:1; margin-top:28px; }
  .my-info-spouse-history-days { grid-column:3; grid-row:1; align-self:start; margin-top:7px; }
  .my-info-spouse-history-name { gap:5px; }
}

/* =====================================================================
   문의 센터
   ===================================================================== */
.contact-layout {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 92px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-intro-panel,
.contact-form-panel,
.contact-history-panel {
  background: #0A0D14;
  border: 1px solid #202635;
  border-radius: 12px;
  padding: 22px 24px;
}
.contact-kicker {
  display: block;
  color: var(--up);
  font: 700 10px/1.3 var(--font-mono);
  letter-spacing: .08em;
  margin-bottom: 7px;
}
.contact-intro-panel h1 { margin: 0 0 8px; font-size: 22px; }
.contact-intro-panel > p { margin: 0; color: #8D97A9; font-size: 12.5px; line-height: 1.65; }
.contact-email-box {
  margin-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid rgba(41,224,201,.25);
  border-radius: 10px;
  background: rgba(41,224,201,.045);
}
.contact-email-box span { display:block; color:#6F7A8E; font-size:10px; margin-bottom:4px; }
.contact-email-box strong { color:#DDE5EF; font:700 13px/1.3 var(--font-mono); word-break:break-all; }
.contact-email-link,
.contact-refresh-btn {
  border: 1px solid rgba(41,224,201,.36);
  border-radius: 8px;
  background: rgba(41,224,201,.08);
  color: var(--up);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 12px;
  white-space: nowrap;
}
.contact-email-link:hover,
.contact-refresh-btn:hover { background: rgba(41,224,201,.14); }
.contact-refresh-btn:disabled { opacity:.45; cursor:not-allowed; }
.contact-form { margin-top: 16px; }
.contact-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.contact-form label,
.contact-field { display:flex; flex-direction:column; gap:6px; }
.contact-form label > span,
.contact-field > span { color:#8D97A9; font-size:10.5px; font-weight:700; }
.contact-form label > span em,
.contact-field > span em { float:right; color:#5C6478; font-style:normal; font-weight:500; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width:100%;
  min-width:0;
  border:1px solid #2A3242;
  border-radius:8px;
  background:#070A10;
  color:#EAEEF5;
  font:inherit;
  font-size:12.5px;
  padding:10px 11px;
  outline:none;
}
.contact-form textarea { resize:vertical; line-height:1.65; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color:rgba(41,224,201,.58); box-shadow:0 0 0 2px rgba(41,224,201,.07); }
.contact-field { margin-top: 11px; }
.contact-privacy-note { margin:10px 0 0; color:#5F697C; font-size:10px; line-height:1.6; }
.contact-submit-row { margin-top:14px; display:flex; align-items:center; justify-content:flex-end; gap:12px; }
.contact-submit-btn { min-width:120px; margin:0; }
.contact-msg { color:#7B8598; font-size:11px; }
.contact-msg.success { color:var(--up); }
.contact-msg.error { color:#FF6B9E; }
.contact-history-list { display:flex; flex-direction:column; gap:10px; margin-top:14px; }
.contact-empty { padding:26px 12px; text-align:center; color:#5C6478; font-size:11px; }
.contact-empty.error { color:#FF6B9E; }
.contact-history-card { border:1px solid #242B3A; border-radius:10px; background:#0D1118; padding:14px 15px; }
.contact-history-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.contact-history-head > div { display:flex; gap:6px; flex-wrap:wrap; }
.contact-history-head time { color:#566074; font:500 9.5px/1.3 var(--font-mono); white-space:nowrap; }
.contact-category,
.contact-status { display:inline-flex; align-items:center; padding:3px 7px; border-radius:999px; font-size:9px; border:1px solid #30394B; color:#A7B0C0; }
.contact-status.status-new { color:#FF7AA7; border-color:rgba(255,62,127,.35); background:rgba(255,62,127,.07); }
.contact-status.status-checking { color:#FFC857; border-color:rgba(255,200,87,.35); background:rgba(255,200,87,.06); }
.contact-status.status-answered { color:var(--up); border-color:rgba(41,224,201,.35); background:rgba(41,224,201,.06); }
.contact-status.status-closed { color:#6F798C; }
.contact-history-card h3 { margin:10px 0 7px; font-size:14px; }
.contact-history-message { margin:0; color:#AEB8C9; font-size:11.5px; line-height:1.7; word-break:break-word; }
.contact-history-email { margin-top:9px; color:#697488; font-size:10px; }
.contact-admin-reply { margin-top:12px; padding:11px 12px; border-left:2px solid var(--up); background:rgba(41,224,201,.045); border-radius:0 8px 8px 0; }
.contact-admin-reply > span { color:var(--up); font-size:9.5px; font-weight:800; }
.contact-admin-reply p { margin:6px 0 0; color:#C7D0DC; font-size:11.5px; line-height:1.7; }
.contact-admin-reply time { display:block; margin-top:7px; color:#596376; font-size:9px; }

/* 문의 메일이 추가되면서 워터마크가 길어져도 작은 화면에서 겹치지 않게 허용합니다. */
.watermark { max-width: min(620px, calc(100vw - 24px)); text-align: right; line-height: 1.45; }

@media (max-width: 700px) {
  .contact-layout { width:calc(100% - 24px); padding-top:14px; padding-bottom:118px; }
  .contact-intro-panel, .contact-form-panel, .contact-history-panel { padding:17px 15px; }
  .contact-form-grid { grid-template-columns:1fr; }
  .contact-email-box { align-items:flex-start; flex-direction:column; }
  .contact-history-head { align-items:flex-start; flex-direction:column; }
  .contact-history-head time { white-space:normal; }
  .contact-submit-row { align-items:stretch; flex-direction:column; }
  .contact-submit-btn { width:100%; }
  .watermark { bottom:48px; }
}

/* =========================================================
   NIKKE STOCK account gate / ID-PW account protection
   ========================================================= */
.account-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,62,127,.18), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(41,224,201,.12), transparent 26%),
    rgba(4,6,10,.96);
  backdrop-filter: blur(12px);
}
.account-gate-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(18,22,31,.98), rgba(8,11,17,.98));
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
  color: #e9edf5;
}
.account-gate-brand { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.account-gate-brand .brand-mark { width:32px; height:32px; display:grid; place-items:center; border-radius:8px; font-weight:900; color:#fff; background:linear-gradient(135deg,#ff3e7f,#7a3eff); }
.account-gate-brand b { display:block; font-size:12px; letter-spacing:.14em; }
.account-gate-brand small { display:block; margin-top:2px; color:#687286; font-size:9px; letter-spacing:.12em; }
.account-gate-card h1 { margin:0; font-size:24px; }
.account-gate-lead { margin:8px 0 18px; color:#929daf; line-height:1.55; font-size:13px; }
.account-gate-tabs { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:16px; }
.account-gate-tabs button { border:1px solid #293142; border-radius:8px; padding:9px 8px; color:#8994a7; background:#0a0e15; cursor:pointer; font:inherit; font-size:12px; }
.account-gate-tabs button.is-active { color:#fff; border-color:rgba(255,62,127,.48); background:rgba(255,62,127,.10); }
.account-gate-view { display:none; }
.account-gate-view.is-active { display:block; }
.account-gate-view label { display:block; margin:10px 0; color:#a7b0c0; font-size:11px; font-weight:700; }
.account-gate-view input,
.my-info-account-grid input {
  box-sizing:border-box;
  width:100%;
  margin-top:6px;
  border:1px solid #293142;
  border-radius:8px;
  padding:11px 12px;
  color:#edf1f8;
  background:#080c12;
  outline:none;
  font:inherit;
}
.account-gate-view input:focus,
.my-info-account-grid input:focus { border-color:#6e7f9a; box-shadow:0 0 0 2px rgba(110,127,154,.12); }
.account-gate-primary,
.account-gate-google { width:100%; border-radius:9px; padding:11px 14px; cursor:pointer; font:inherit; font-weight:800; }
.account-gate-primary { margin-top:8px; border:1px solid rgba(255,62,127,.48); color:#fff; background:linear-gradient(135deg,rgba(255,62,127,.95),rgba(122,62,255,.9)); }
.account-gate-google { border:1px solid #3b465a; color:#e7ebf3; background:#131923; }
.account-gate-primary:disabled,
.account-gate-google:disabled { opacity:.6; cursor:wait; }
.account-gate-divider { display:flex; align-items:center; gap:10px; margin:14px 0; color:#596273; font-size:10px; }
.account-gate-divider::before,.account-gate-divider::after { content:""; height:1px; flex:1; background:#222a38; }
.account-gate-help { margin:9px 0 0; color:#747f91; font-size:10.5px; line-height:1.55; }
.account-gate-msg { min-height:18px; margin:14px 0 0; color:#aeb7c7; font-size:11px; line-height:1.5; }
.account-gate-msg.error { color:#ff89ae; }
.account-gate-msg.success { color:#67dfc8; }
.account-gate-support { margin-top:10px; padding-top:12px; border-top:1px solid #202735; color:#687286; font-size:10.5px; text-align:center; }
.account-gate-support a { color:#9edbd3; text-decoration:none; }

.my-info-account-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 10px; margin:10px 0; }
.my-info-account-grid label { color:#7e899c; font-size:10px; }
.my-info-account-grid label span { display:block; }
.my-info-account-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:10px 0; }
.my-info-account-summary > div { border:1px solid rgba(255,255,255,.08); border-radius:8px; background:rgba(255,255,255,.025); padding:9px 10px; min-width:0; }
.my-info-account-summary span { display:block; color:#738095; font-size:9px; margin-bottom:4px; }
.my-info-account-summary b { display:block; color:#dce3ee; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.my-info-account-actions { display:flex; gap:7px; flex-wrap:wrap; }

@media (max-width: 620px) {
  .account-gate-overlay { padding:10px; align-items:start; overflow:auto; }
  .account-gate-card { margin-top:10px; padding:18px 15px; max-height:none; }
  .account-gate-tabs { grid-template-columns:1fr; }
  .my-info-account-grid, .my-info-account-summary { grid-template-columns:1fr; }
}
.my-info-btn.needs-account-protection { position:relative; box-shadow:0 0 0 2px rgba(255,200,87,.34); }
.my-info-btn.needs-account-protection::after { content:"!"; position:absolute; right:-4px; top:-5px; min-width:15px; height:15px; display:grid; place-items:center; border-radius:999px; background:#ffc857; color:#17120a; font-size:10px; font-weight:900; box-shadow:0 2px 10px rgba(0,0,0,.35); }
