/* MedWidget site, option C (minimal). Colors are the app's own (AccentColor, StatusTaken, OnAccent, D59). */
:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #222222;
  --muted: #555555;
  --faint: #888888;
  --line: #ecebe7;
  --accent: #5e9a8a;
  --accent-text: #3f7466;
  --on-accent: #ffffff;
  --taken: #66a06a;
  --badge-bg: #111111;
  --badge-text: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f2f2f2;
    --muted: #b8b8b8;
    --faint: #8a8a8a;
    --line: #2c2c2e;
    --accent: #40d9c6;
    --accent-text: #40d9c6;
    --on-accent: #000000;
    --taken: #4cd471;
    --badge-bg: #ffffff;
    --badge-text: #111111;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

a { color: var(--accent-text); }
/* Japanese: break lines between phrases, not inside words (browsers without support ignore it) */
html:lang(ja) { word-break: auto-phrase; }

/* Homepage */
.home { max-width: 640px; margin: 0 auto; padding: 70px 24px 40px; text-align: center; }
.app-icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 12px 30px rgba(17, 130, 116, 0.25); }
h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; margin: 22px 0 4px; }
.subtitle { font-size: 22px; color: var(--accent-text); font-weight: 600; margin: 0 0 18px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 auto 26px; max-width: 500px; }

.store-badge {
  display: inline-flex; align-items: center;
  background: var(--badge-bg); color: var(--badge-text);
  border-radius: 12px; padding: 9px 18px; text-decoration: none;
  font-size: 12px; line-height: 1.2; text-align: left;
}
.store-badge b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }

.phones { display: flex; justify-content: center; gap: 36px; width: 740px; margin: 56px 0 40px calc(50% - 370px); }

/* iPhone with a Home Screen, cropped at the bottom. Each phone keeps its own light or dark look whatever the site theme is.
   Sizes are a real iPhone scaled so the 2x2 widget is 146px wide (a real small widget is about 170pt on a 393pt screen). */
.phone { width: 340px; height: 300px; border-radius: 54px 54px 0 0; background: #111; padding: 11px 11px 0; flex: none;
  -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.screen { position: relative; width: 100%; height: 100%; border-radius: 44px 44px 0 0; overflow: hidden; padding: 58px 18px 0; text-align: left;
  background: linear-gradient(170deg, #cfe3dc 0%, #e9e1d3 70%, #d9cdbb 100%); color: #000;
  --w-bg: #ffffff; --w-text: #000000; --w-muted: rgba(60, 60, 67, 0.6); --w-accent: #5e9a8a; --w-on-accent: #ffffff; --w-track: rgba(120, 120, 128, 0.2); --tile: rgba(255, 255, 255, 0.55); }
.screen.dark { background: linear-gradient(170deg, #1d2b33 0%, #2b2330 100%); color: #fff;
  --w-bg: #1c1c1e; --w-text: #ffffff; --w-muted: rgba(235, 235, 245, 0.6); --w-accent: #40d9c6; --w-on-accent: #000000; --w-track: rgba(120, 120, 128, 0.36); --tile: rgba(255, 255, 255, 0.14); }
.island { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 100px; height: 30px; border-radius: 16px; background: #000; }
.clock { position: absolute; top: 18px; left: 34px; font-size: 15px; font-weight: 600; line-height: 1; }

/* Home Screen grid: 4 columns; the small widget spans 2 x 2 like on iOS. */
.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 62px; gap: 26px 20px; }
.home-grid .tile { border-radius: 15px; background: var(--tile); }
.home-grid .tile.me { background: url(icon.png) center / cover; }

/* Small (2x2) widget, built like SmallWidgetView in the app (DESIGN 3.1, capsule style 3.5). */
.widget { grid-column: span 2; grid-row: span 2; background: var(--w-bg); color: var(--w-text); border-radius: 20px; padding: 13px 13px 12px;
  display: flex; flex-direction: column; font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.w-top { display: flex; align-items: flex-start; justify-content: space-between; height: 24px; }
.capsule { position: relative; width: 32px; height: 14px; border-radius: 7px; overflow: hidden; transform: rotate(-30deg); margin: 6px 0 0 1px;
  background: color-mix(in srgb, var(--w-accent) 32%, transparent); }
.capsule::before { content: ""; position: absolute; inset: 0 50% 0 0; background: var(--w-accent); }
.capsule::after { content: ""; position: absolute; left: 5px; top: 3px; width: 9px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, 0.45); }
.chip { font-family: -apple-system, system-ui, sans-serif; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: 8px;
  background: var(--w-accent); color: var(--w-on-accent); }
.w-bar { width: 44px; height: 4px; border-radius: 2px; background: var(--w-track); margin-top: 10px; overflow: hidden; }
.w-bar i { display: block; height: 100%; background: var(--w-accent); border-radius: 2px; }
.w-time { margin-top: auto; font-size: 25px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-time small { font-size: 17px; font-weight: 800; }
.w-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-name span { font-size: 11px; color: var(--w-muted); }
.w-taken { margin-top: 6px; height: 26px; border-radius: 13px; background: var(--w-accent); color: var(--w-on-accent);
  font-family: -apple-system, system-ui, sans-serif; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 4px; }

/* App screenshots: light or dark follows the visitor's theme */
.gallery { display: flex; justify-content: center; gap: 26px; margin: 20px 0 50px; }
.gallery figure { margin: 0; }
.gallery .mid { transform: translateY(-16px); }
.screen-shot { display: block; width: 210px; height: auto; border-radius: 32px; border: 6px solid #111; background: #111;
  box-shadow: 0 18px 36px -16px rgba(30, 50, 45, 0.35); }
@media (prefers-color-scheme: dark) { .screen-shot { box-shadow: 0 0 0 1px #3a3a3c; } }
.gallery figcaption { font-size: 14px; margin-top: 12px; color: var(--muted); }
.gallery figcaption b { display: block; color: var(--text); }

.features { list-style: none; padding: 0; margin: 0 auto; max-width: 460px; text-align: left; }
.features li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.features li > i { font-style: normal; color: var(--accent-text); font-weight: 700; }
.features b { display: block; }
.features em { font-style: normal; color: var(--muted); font-size: 15px; }
.price { margin: 40px 0 10px; color: var(--muted); }
.price b { color: var(--text); }

/* Text pages (privacy, support) */
.site-nav { max-width: 720px; margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; font-size: 18px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav .links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-nav .links a { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.site-nav .links a:hover, .site-nav .links a[aria-current="page"] { color: var(--text); }
.page { max-width: 720px; margin: 0 auto; padding: 20px 24px 60px; }
.page h1 { font-size: clamp(30px, 6vw, 42px); margin-top: 10px; hyphens: auto; overflow-wrap: break-word; }
.page h2 { font-size: 22px; margin: 36px 0 8px; }
.page p, .page li { color: var(--muted); }
.page strong { color: var(--text); }
.meta { color: var(--faint); font-size: 15px; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin: 22px 0; }
.summary p { margin: 0; color: var(--text); }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; color: var(--text); }
details p, details ol, details ul { margin: 10px 0 0; }
.contact { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-top: 34px; }
.contact h2 { margin-top: 0; }

/* Placeholder text that must be filled in before launch */
.todo { background: #fff3c4; color: #5c4400; border-radius: 4px; padding: 0 4px; }

footer { text-align: center; color: var(--faint); font-size: 14px; padding: 30px 24px; }
footer a { color: var(--muted); margin: 0 10px; }
footer .langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; max-width: 640px; margin: 16px auto 0; font-size: 13px; }
footer .langs a { margin: 0; text-decoration: none; }
footer .langs a:hover { text-decoration: underline; }
footer .langs a[aria-current="page"] { color: var(--text); font-weight: 600; }

@media (max-width: 760px) {
  .home { padding-top: 48px; }
  .phones { zoom: 0.62; margin-top: 70px; }
}

@media (max-width: 480px) {
  .phones { zoom: 0.48; }
  .site-nav .links { width: 100%; margin-left: 0; gap: 6px 18px; }
  .gallery { gap: 10px; margin-left: -8px; margin-right: -8px; }
  .gallery .mid { transform: none; }
  .screen-shot { width: 110px; border-radius: 18px; border-width: 4px; }
  .gallery figcaption { font-size: 12px; }
}
