:root {
  --bg: #f3f6f6;
  --paper: #fff;
  --ink: #193235;
  --sub: #6a7c7f;
  --line: #dfe8e8;
  --accent: #087f76;
  --soft: #e7f5f2;
}
* {
  box-sizing: border-box;
}
html {
  font-size: 16px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif;
  line-height: 1.65;
  word-break: keep-all;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #49b7a8;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 1.6rem;
  line-height: 1.4;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 1.15rem;
  line-height: 1.55;
}
h3 {
  font-size: 1rem;
}
header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 20;
}
.header-inner {
  max-width: 1320px;
  min-height: 76px;
  margin: auto;
  padding: 12px 24px;
  display: flex;
  gap: 36px;
  align-items: center;
}
.brand {
  font-size: 1.65rem;
  font-weight: 850;
  letter-spacing: -0.06em;
  white-space: nowrap;
}
.brand span {
  font-size: 0.875rem;
  color: var(--accent);
  letter-spacing: 0;
}
.header-nav,
.account {
  display: flex;
  gap: 20px;
  align-items: center;
}
.account {
  margin-left: auto;
  gap: 12px;
}
.account form {
  margin: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 650;
  font-size: 0.875rem;
}
.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
.text-button {
  border: 0;
  background: none;
  font-size: 0.875rem;
  color: var(--sub);
}
.shell {
  max-width: 1320px;
  margin: auto;
  padding: 30px 24px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 250px;
  gap: 28px;
}
.sidebar {
  align-self: start;
  position: sticky;
  top: 106px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar a {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.9375rem;
}
.sidebar a:hover {
  background: var(--soft);
  color: var(--accent);
}
.sidebar hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}
.eyebrow {
  color: var(--sub);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.page-heading {
  margin-bottom: 22px;
}
.page-heading p {
  margin-top: 6px;
}
.card {
  padding: 24px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  overflow-wrap: anywhere;
}
.post-card h2 {
  margin: 10px 0 7px;
  font-size: 1.125rem;
}
.post-card h2 a:hover {
  color: var(--accent);
}
.metadata {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--sub);
}
.metadata time {
  margin-left: auto;
}
.excerpt {
  font-size: 0.9375rem;
  color: #4d6265;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-bottom {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
}
.chip {
  display: inline-block;
  font-size: 0.8125rem;
  background: var(--soft);
  color: #075e58;
  border-radius: 6px;
  padding: 3px 9px;
}
.muted {
  color: var(--sub);
}
.small {
  font-size: 0.875rem;
}
.profile-card h2 {
  margin: 10px 0;
}
.profile-card .button {
  margin-top: 16px;
}
.rightbar {
  align-self: start;
  position: sticky;
  top: 106px;
}
.ad {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.ad-top {
  height: 90px;
  margin: 18px 0;
}
.ad-side {
  height: 250px;
  margin-top: 22px;
}
.ad-inline {
  height: 100px;
  margin: 20px 0;
}
.feed-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 6px;
}
.feed-controls label {
  font-size: 0.875rem;
  color: var(--sub);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.feed-controls select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
}
.load-more {
  display: block;
  margin: 20px auto;
}
.stream-status {
  text-align: center;
  font-size: 0.875rem;
}
.empty {
  padding: 42px;
  text-align: center;
}
.notice {
  background: var(--soft);
  border: 1px solid #bcdcd5;
  border-radius: 10px;
  padding: 13px 18px;
  margin-bottom: 16px;
}
.form-card h1 {
  margin-bottom: 22px;
}
.form-card form p {
  margin: 0 0 20px;
}
.form-card label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-card input:not([type="checkbox"]):not([type="radio"]),
.form-card textarea,
.form-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
textarea {
  resize: vertical;
}
.helptext {
  display: block;
  font-size: 0.875rem;
  color: var(--sub);
  margin-top: 6px;
}
.errorlist {
  color: #a32f30;
  padding-left: 20px;
  font-size: 0.875rem;
}
#id_targets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
#id_targets label {
  font-weight: 400;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
  font-size: 0.875rem;
}
.actions button:not(.button) {
  border: 0;
  color: var(--accent);
  background: var(--soft);
  border-radius: 7px;
  padding: 5px 10px;
}
.actions a:hover {
  text-decoration: underline;
}
.body-text {
  white-space: normal;
  overflow-wrap: anywhere;
  margin: 20px 0;
  line-height: 1.9;
}
.body-text a {
  color: var(--accent);
  text-decoration: underline;
}
.detail-card h1 {
  margin: 15px 0;
}
.answer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 0 14px;
  gap: 12px;
}
.reply {
  border-left: 3px solid var(--line);
  padding: 10px 15px;
  margin-top: 16px;
  background: #f7faf9;
  border-radius: 0 8px 8px 0;
}
.section-title {
  margin: 30px 0 14px;
}
.back {
  display: block;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: var(--sub);
}
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}
.social {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  font-weight: 600;
  background: white;
}
.kakao {
  background: #fee500;
  border-color: #fee500;
}
.apple {
  background: #193235;
  color: white;
}
.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
  margin-top: 20px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  background: var(--ink);
  color: white;
  padding: 12px;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  z-index: 100;
}
.topic-mobile,
.mobile-nav {
  display: none;
}
button[aria-pressed="true"] {
  background: var(--soft);
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .rightbar {
    display: none;
  }
  .header-nav {
    gap: 14px;
  }
}
@media (max-width: 700px) {
  .header-inner {
    padding: 12px 16px;
    gap: 12px;
    min-height: 66px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 1.4rem;
  }
  .brand span {
    font-size: 0.75rem;
  }
  .header-nav {
    display: none;
  }
  .account {
    gap: 8px;
  }
  .account > a:first-child {
    font-size: 0.8125rem;
  }
  .account .button {
    padding: 7px 10px;
  }
  .account form {
    display: none;
  }
  .shell {
    display: block;
    padding: 22px 14px 90px;
  }
  .sidebar {
    display: none;
  }
  .topic-mobile {
    display: flex;
    gap: 8px;
    overflow: auto;
    margin-bottom: 18px;
  }
  .topic-mobile a {
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 0.875rem;
    white-space: nowrap;
  }
  .card {
    padding: 19px;
  }
  .card-bottom {
    gap: 8px;
  }
  .metadata {
    gap: 8px;
  }
  .metadata time {
    margin-left: 0;
  }
  .ad-top {
    height: 80px;
  }
  .ad-inline {
    height: 90px;
  }
  .feed-controls {
    gap: 8px;
  }
  .feed-controls label {
    flex: 1;
    min-width: 90px;
  }
  .feed-controls select {
    width: 100%;
  }
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    gap: 5px;
    padding: 13px 10px calc(13px + env(safe-area-inset-bottom));
    background: white;
    border-top: 1px solid var(--line);
    z-index: 30;
    font-size: 0.875rem;
  }
  #id_targets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .body-text {
    font-size: 1rem;
  }
  .profile-card {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Shared teal line icons keep the feed, details and mobile topics consistent. */
:root {
  --sub: #566e72;
  --line: #dbe6e5;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 460px;
}
.brand-group .brand {
  flex: none;
}
.brand-description {
  max-width: 205px;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--sub);
  letter-spacing: -0.025em;
}
.header-inner {
  gap: 26px;
  min-height: 88px;
}
.header-nav a,
.sidebar a,
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar {
  top: 118px;
}
.rightbar {
  top: 118px;
}
.topic-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--accent);
}
.sidebar .topic-link {
  padding: 8px 10px;
  font-weight: 500;
}
.sidebar .is-active,
.topic-mobile .is-active {
  background: #dff1ed;
  color: #07655e;
  font-weight: 700;
}
.sidebar .is-active .topic-icon {
  background: var(--accent);
  color: white;
}
.post-card {
  padding: 25px 26px;
}
.post-card h2 {
  font-size: 1.2rem;
  line-height: 1.55;
  letter-spacing: -0.025em;
  margin: 12px 0 9px;
}
.metadata {
  color: var(--sub);
  row-gap: 6px;
}
.metadata > span:first-child {
  color: var(--accent);
  font-weight: 650;
}
.excerpt {
  line-height: 1.8;
  color: #455f63;
}
.card-bottom {
  padding-top: 16px;
  border-top: 1px solid #eef3f2;
  margin-top: 18px;
}
.post-stats {
  display: inline-flex;
  gap: 15px;
  color: var(--sub);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.post-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.post-stats .icon {
  width: 17px;
  height: 17px;
}
.actions [data-reaction="like"],
.actions [data-reaction="bookmark"] {
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--sub);
}
.actions button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--soft);
  border-color: #8ac6bc;
}
.actions button[aria-pressed="true"] .icon {
  fill: currentColor;
  stroke: currentColor;
}
.detail-card h1 {
  font-size: 1.8rem;
  line-height: 1.5;
  letter-spacing: -0.035em;
}
.body-text {
  color: #2c474b;
}
.topic-mobile a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topic-mobile .icon {
  width: 17px;
  height: 17px;
  color: var(--accent);
}
@media (max-width: 1100px) {
  .brand-group {
    max-width: 350px;
    gap: 12px;
  }
  .header-inner {
    gap: 18px;
  }
  .header-nav {
    gap: 12px;
  }
}
@media (max-width: 700px) {
  .header-inner {
    min-height: 94px;
    gap: 8px 12px;
  }
  .brand-group {
    max-width: none;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .brand-description {
    max-width: none;
    font-size: 0.6875rem;
    line-height: 1.5;
  }
  .account {
    position: absolute;
    right: 16px;
    top: 12px;
    max-width: 55%;
  }
  .account > a:first-child {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .account .button {
    font-size: 0.75rem;
  }
  .post-card {
    padding: 19px;
  }
  .post-card h2 {
    font-size: 1.125rem;
  }
  .post-stats {
    gap: 12px;
  }
  .detail-card h1 {
    font-size: 1.45rem;
  }
  .mobile-nav a {
    flex-direction: column;
    gap: 3px;
  }
  .mobile-nav .icon {
    width: 18px;
    height: 18px;
  }
}

.transfer-details {
  margin: 16px 0 0;
}
.transfer-details dt {
  font-weight: 700;
  margin-top: 16px;
}
.transfer-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
.transfer-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 16px 0;
}
.transfer-table th,
.transfer-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.transfer-table th:first-child {
  width: 34%;
}
