/* keeplnks.com: home, help, iPad, privacy and collection pages. System fonts only; only collection pages load images from other sites. */
:root {
  --bg: #f7f6f4;
  --surface: #ffffff;
  --text: #1d1e24;
  --muted: #62677a;
  --line: #e6e3df;
  --accent: #9e4a68;
  --accent-strong: #873c58;
  --accent-soft: #f4eaee;
  --dot: #c25780;
  --focus: #9e4a68;
  --on-accent: #ffffff;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.shell { width: min(960px, 100% - 40px); margin-inline: auto; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); position: sticky; top: 0; backdrop-filter: blur(12px); z-index: 2; }
.site-header .shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.brand .dot { display: inline-block; width: 6px; height: 6px; margin-left: 2px; border-radius: 50%; background: var(--dot); transform: translateY(-1px); }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.lang { display: inline-flex; gap: 6px; color: var(--muted); font-size: 13px; }
.lang a { color: var(--muted); text-decoration: none; }
.lang a[aria-current="true"] { color: var(--text); font-weight: 600; }
@media (max-width: 640px) { .site-nav .wide { display: none; } }

/* Hero */
.hero { padding: 64px 0 48px; }
.hero-icon { display: block; width: 64px; height: 64px; margin-bottom: 20px; border-radius: 15px; box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(0,0,0,.06); }
.section-title { margin: 0 0 20px; font-size: 22px; letter-spacing: -0.01em; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); line-height: 1.25; letter-spacing: -0.02em; }
.lead { max-width: 560px; margin: 16px 0 28px; color: var(--muted); font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.button.ghost { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.button.ghost:hover { border-color: var(--muted); color: var(--text); }

/* Topic cards */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-bottom: 48px; }
.topic { display: block; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.topic:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--text); }
.topic svg { width: 22px; height: 22px; color: var(--accent); }
.topic strong { display: block; margin-top: 12px; font-size: 16px; }
.topic span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 720px) {
  .topics { grid-template-columns: 1fr; gap: 8px; }
  .topic { display: grid; grid-template-columns: 22px 1fr; column-gap: 14px; align-items: center; padding: 14px 16px; }
  .topic svg { grid-row: span 2; }
  .topic strong { margin-top: 0; font-size: 15px; }
  .topic span { margin-top: 0; }
}

/* FAQ */
.faq { padding: 8px 0 64px; }
.faq-group { margin-bottom: 36px; scroll-margin-top: 80px; }
.faq-group h3 { margin: 0 0 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.faq-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
details + details { border-top: 1px solid var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details .answer { padding: 0 20px 20px; color: var(--muted); }
details .answer p { margin: 0 0 8px; }
details .answer p:last-child { margin-bottom: 0; }
.path { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--text); font-size: 14px; }

/* Contact */
.contact { margin-block: 24px 72px; padding: 28px; border-radius: var(--radius); background: var(--accent-soft); scroll-margin-top: 80px; }
.contact h2 { margin: 0 0 8px; font-size: 22px; }
.contact p { margin: 0 0 16px; color: var(--muted); }
.contact .mail { font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; }
.contact .mail:hover { color: var(--accent-strong); }
.contact ul { margin: 16px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }

/* Policy */
.policy { width: min(760px, 100% - 40px); margin: 40px auto 72px; padding: 40px 44px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.policy h1 { font-size: clamp(26px, 4vw, 34px); }
.meta { margin: 8px 0 28px; color: var(--muted); font-size: 14px; }
.policy h2 { margin: 32px 0 10px; font-size: 18px; }
.policy p { margin: 0 0 12px; }
.policy ul { margin: 0 0 14px; padding-left: 20px; }
.policy li + li { margin-top: 6px; }
@media (max-width: 640px) { .policy { margin-top: 20px; padding: 28px 22px; border-radius: 16px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.site-footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer a { color: var(--muted); }

/* Home */
.button.text { padding: 0 6px; color: var(--accent); }
.button.text:hover { color: var(--accent-strong); }
.home-hero { padding: 72px 0 80px; background: linear-gradient(180deg, var(--bg) 0%, var(--accent-soft) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; }
.hero-copy h1 { font-size: clamp(34px, 5.2vw, 54px); line-height: 1.18; }
.hero-copy .lead { font-size: 18px; }
.hero-visual { display: flex; justify-content: center; }
.phone { width: 300px; padding: 18px 16px 22px; border: 10px solid #1f1f24; border-radius: 44px; background: #f9f9fb; box-shadow: 0 30px 60px -20px rgba(60, 30, 45, .35); color: #1b1d25; }
.phone-top { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px 12px; }
.mock-logo { padding: 3px 9px; border-radius: 8px; background: #d6006e; color: #fff; font-size: 14px; font-weight: 800; font-style: italic; }
.mock-bell { width: 16px; height: 16px; border: 2px solid #d6006e; border-radius: 8px 8px 3px 3px; }
.mock-search { height: 30px; margin: 0 2px 12px; border-radius: 10px; background: #eff0f4; }
.mock-chips { display: flex; gap: 6px; margin-bottom: 12px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.mock-chips span { padding: 5px 10px; border-radius: 999px; background: #eff0f4; color: #4c5263; }
.mock-chips .on { background: #d6006e; color: #fff; }
.mock-card { overflow: hidden; border: 1px solid #f1c6d8; border-radius: 14px; background: #fff; }
.mock-card p { margin: 8px 10px 2px; font-size: 12px; font-weight: 700; line-height: 1.35; }
.mock-card small { display: block; margin: 0 10px 10px; color: #7a8091; font-size: 10px; }
.mock-card.wide { margin-bottom: 8px; }
.mock-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mock-img { height: 76px; }
.mock-card.wide .mock-img { height: 110px; }
.mock-img.sea { background: linear-gradient(160deg, #e9d6b8 0%, #d9b98c 45%, #a8b6a0 100%); }
.mock-img.bread { background: radial-gradient(circle at 35% 55%, #d9a46a 0 22%, transparent 23%), radial-gradient(circle at 68% 45%, #c88a4f 0 20%, transparent 21%), #f3e6d6; }
.mock-img.knit { background: repeating-linear-gradient(135deg, #b9c4d6 0 6px, #aab6ca 6px 12px); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-block: 80px 72px; }
.feature-num { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.features h2 { margin: 10px 0 8px; font-size: 20px; letter-spacing: -0.01em; }
.features p { margin: 0; color: var(--muted); }
.promise { border-top: 1px solid var(--line); background: var(--surface); }
.promise-grid { display: grid; grid-template-columns: 0.8fr 2fr; gap: 40px; align-items: center; padding-block: 56px; }
.promise-title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.promise ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.promise strong { display: block; margin-bottom: 4px; }
.promise span { color: var(--muted); font-size: 15px; }
.page-head { padding: 56px 0 24px; }
.help-body { padding-top: 8px; }
@media (max-width: 860px) {
  .home-hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: 1fr; gap: 28px; padding-block: 56px; }
  .promise-grid { grid-template-columns: 1fr; gap: 20px; }
  .promise ul { grid-template-columns: 1fr; gap: 14px; }
}

/* Real captures */
.device { display: block; overflow: hidden; border: 9px solid #1f1f24; background: #1f1f24; box-shadow: 0 30px 60px -24px rgba(60, 30, 45, .38); }
.device img { display: block; width: 100%; height: auto; }
.device.phone-shot { width: min(290px, 78vw); border-radius: 46px; }
.device.phone-shot img { border-radius: 37px; }
.device.tablet { border-width: 12px; border-radius: 30px; }
.device.tablet img { border-radius: 18px; }

/* iPad and iPhone together */
.devices { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; padding-block: 72px 88px; }
.devices .lead { margin-bottom: 0; }
.devices-visual { position: relative; padding: 0 0 48px; }
.devices-visual .device.tablet { width: 88%; }
.devices-visual .device.phone-shot { position: absolute; right: 0; bottom: 0; width: 30%; border-width: 6px; border-radius: 28px; }
.devices-visual .device.phone-shot img { border-radius: 22px; }
.button.soon { border: 1px dashed var(--line); background: var(--surface); color: var(--muted); cursor: default; }
@media (max-width: 860px) {
  .devices { grid-template-columns: 1fr; gap: 28px; padding-block: 48px 64px; }
  .device.tablet { border-width: 7px; border-radius: 20px; }
  .device.tablet img { border-radius: 13px; }
  .devices-visual .device.phone-shot { border-width: 4px; border-radius: 18px; }
  .devices-visual .device.phone-shot img { border-radius: 14px; }
}

/* Gentle motion: the hero copy rises in on load, the hero phone shows the save toast once, and
   the devices below float slowly. Off with Reduce Motion. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .devices-visual .device.tablet { animation: float 6s ease-in-out 1.1s infinite; }
  .saved-toast { animation: saved-toast 4.4s 1.2s cubic-bezier(.2, .8, .2, 1) both; }
  .devices-visual .device.phone-shot { animation: float 5s ease-in-out -2.5s infinite; }
}

/* Drawn like the app's save toast, in the same place on the home screen. */
.hero-visual .device { position: relative; container-type: inline-size; }
.saved-toast { position: absolute; top: 6.4%; left: 50%; display: flex; align-items: center; gap: 2.6cqw; padding: 2.4cqw 5cqw 2.4cqw 3.6cqw; border-radius: 999px; background: rgba(250, 250, 252, .96); border: .6px solid #dfe2e9; box-shadow: 0 3px 8px rgba(0, 0, 0, .12); color: #1b1d25; font-size: 4cqw; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; opacity: 0; transform: translate(-50%, -140%); pointer-events: none; }
.saved-toast i { width: 4.8cqw; height: 4.8cqw; border-radius: 50%; background: #34c759 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; }
@keyframes saved-toast { 0% { opacity: 0; transform: translate(-50%, -140%); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -140%); } }

/* Collections (/c) */
button.button { border: 0; cursor: pointer; font-family: inherit; }
button.button.ghost { border: 1px solid var(--line); }
.page-head { padding: 48px 0 24px; }
.page-head h1 { font-size: clamp(28px, 4.5vw, 38px); }
.page-head .lead { margin-bottom: 0; }
.kicker { margin: 0; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.collection-cover { display: grid; gap: 4px; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.collection-cover .main { display: block; aspect-ratio: 1.91 / 1; }
.collection-cover .strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.collection-cover .tile { position: relative; display: block; aspect-ratio: 1.6 / 1; }
.tile-image { display: block; width: 100%; height: 100%; object-fit: cover; background: #ffd6e3; }
.tile-image.empty { background: #ffd6e3; }
.more-count { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(29, 30, 36, .5); color: #fff; font-size: 20px; font-weight: 700; }
.collection { max-width: 720px; padding: 32px 0 56px; }
.collection-head { padding: 28px 0 8px; }
.collection-head h1 { margin-top: 8px; font-size: clamp(26px, 4.5vw, 36px); }
.collection-head .lead { margin: 12px 0 0; max-width: none; }
.editor-note { margin: 20px 0 0; padding: 16px 18px; border-radius: 12px; background: var(--accent-soft); font-size: 15px; }
.editor-note span { display: block; margin-bottom: 4px; color: var(--accent-strong); font-size: 12px; font-weight: 700; }
.dates { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.collection-items { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.collection-item a { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.collection-item a:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--text); }
.item-image { display: block; width: 120px; aspect-ratio: 1.91 / 1; border-radius: 9px; object-fit: cover; background: #ffd6e3; }
.item-text { display: grid; gap: 2px; min-width: 0; }
.item-number { color: var(--accent); font-size: 12px; font-weight: 700; }
.item-text strong { font-size: 16px; line-height: 1.45; }
.item-site { color: var(--muted); font-size: 13px; }
.item-note { margin-top: 6px; font-size: 14px; line-height: 1.6; }
.collection-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.collection-actions form { margin: 0; }
.collection-fineprint { margin: 24px 0 0; color: var(--muted); font-size: 13px; }
.collection-grid { list-style: none; margin: 0 auto; padding: 0 0 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.collection-card { display: block; padding: 10px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: var(--surface); color: var(--text); text-decoration: none; }
.collection-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--text); }
.collection-card .collection-cover { border-radius: 10px; }
.card-text { display: grid; gap: 4px; padding: 12px 4px 4px; }
.card-text strong { font-size: 16px; line-height: 1.45; }
@media (max-width: 560px) {
  .collection-item a { grid-template-columns: 88px 1fr; gap: 12px; }
  .item-image { width: 88px; }
}
/* A link without an image shows its site's name on the site's color (same as the app). */
.site-tile { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 8%; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; }
.site-tile-name { font-size: 11px; font-weight: 800; letter-spacing: 0.02em; opacity: 0.75; }
.site-tile-title { font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.collection-cover .main .site-tile-name { font-size: 14px; }
.collection-cover .main .site-tile-title { font-size: clamp(20px, 4vw, 30px); }
.collection-cover .tile .site-tile-title, .item-image.site-tile .site-tile-title { font-size: 12px; }
.collection-cover .tile .site-tile { padding: 8px; }
.item-image.site-tile { padding: 6px 8px; justify-content: center; }
/* The site name is already beside the thumbnail in the list. */
.item-image.site-tile .site-tile-name { display: none; }
.item-image.site-tile .site-tile-title { -webkit-line-clamp: 2; font-size: 11px; line-height: 1.3; }
@media (min-width: 561px) { .item-image.site-tile .site-tile-title { -webkit-line-clamp: 3; font-size: 12px; } }
