/* Hochi palette: blue #0070FF, crimson #BE3455, orange #FF9F00, violet #5932C0 */
:root {
  --blue: #0070ff; --blue-deep: #0052c2; --crimson: #be3455; --orange: #ff9f00; --violet: #5932c0;
  --ink: #14181f; --mute: #667085; --line: #e4e7ec; --paper: #f5f6f8; --card: #fff;
  --like: #1f9d55; --improve: #e07b00;
  --font: "R-Flex", "Avenir Next", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--ink); background: var(--paper); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top { position: relative; overflow: hidden; background: var(--blue); color: #fff; padding: 26px 32px 30px; }
.top::before, .top::after { content: ""; position: absolute; border-radius: 46% 54% 60% 40% / 52% 44% 56% 48%; opacity: .92; pointer-events: none; }
.top::before { width: 300px; height: 260px; right: -70px; top: -120px; background: var(--violet); }
.top::after { width: 190px; height: 170px; right: 150px; bottom: -110px; background: var(--orange); }
.top .blob { position: absolute; width: 120px; height: 110px; right: 40px; bottom: -60px; background: var(--crimson); border-radius: 58% 42% 45% 55% / 48% 58% 42% 52%; pointer-events: none; }
.top > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -.02em; font-size: 26px; }
.brand img { height: 30px; display: block; }
.brand small { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .8; border-left: 1px solid rgba(255,255,255,.45); padding-left: 12px; }
.top h1 { margin: 18px 0 6px; font-size: clamp(24px, 3.2vw, 36px); line-height: 1.1; letter-spacing: -.02em; max-width: 780px; }
.top p { margin: 0; max-width: 700px; opacity: .93; }
.who { position: absolute; right: 32px; top: 26px; z-index: 2; font-size: 13px; text-align: right; }
.who a { color: #fff; opacity: .85; }

/* ---------- toolbar ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 10px 32px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; font-size: 13.5px; font-weight: 500; }
.chip b { font-weight: 700; margin-left: 4px; color: var(--mute); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on b { color: #fff; opacity: .7; }
.bar input[type=search] { flex: 1 1 180px; max-width: 280px; border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; background: #fff; }
.progress { margin-left: auto; font-size: 13px; color: var(--mute); display: flex; align-items: center; gap: 10px; }
.progress i { display: block; width: 120px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress i::after { content: ""; display: block; height: 100%; width: var(--pct, 0%); background: var(--blue); }
.saving { font-size: 12.5px; color: var(--mute); min-width: 86px; }

/* ---------- grid ---------- */
main { padding: 8px 32px 80px; max-width: 1680px; margin: 0 auto; }
.product { margin-top: 30px; }
.product h2 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: baseline; gap: 10px; }
.product h2 span { font-size: 12px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 5px; padding: 2px 7px; letter-spacing: .03em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: 0 6px 20px rgba(16,24,40,.09); }
.card.like { border-color: var(--like); } .card.improve { border-color: var(--improve); }
.card .pic { position: relative; display: block; aspect-ratio: 1; background: #eceef1; border: 0; padding: 0; width: 100%; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .pic .zoomhint { position: absolute; right: 8px; top: 8px; background: rgba(20,24,31,.62); color: #fff; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; opacity: 0; transition: opacity .15s; }
.card:hover .zoomhint { opacity: 1; }
.card .pic .count { position: absolute; left: 8px; bottom: 8px; background: #fff; border-radius: 99px; font-size: 12px; font-weight: 600; padding: 2px 9px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.acts { display: flex; gap: 6px; padding: 9px; }
.act { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.act:hover { border-color: #b8bec9; }
.act.like.on { background: var(--like); border-color: var(--like); color: #fff; }
.act.improve.on { background: var(--improve); border-color: var(--improve); color: #fff; }
.act.note { flex: 0 0 auto; padding: 7px 11px; }
.act.note.on { border-color: var(--blue); color: var(--blue); }
.empty { padding: 60px 0; text-align: center; color: var(--mute); }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 50; background: #0d1017; display: grid; grid-template-columns: 1fr 380px; }
.stage { position: relative; overflow: hidden; touch-action: none; cursor: zoom-in; background: #0d1017; }
.stage.zoomed { cursor: grab; } .stage.drag { cursor: grabbing; }
.stage img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; will-change: transform; }
.lb .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; z-index: 2; }
.lb .nav:hover { background: rgba(255,255,255,.28); }
.lb .prev { left: 16px; } .lb .next { right: 16px; }
.zoomctl { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 6px; background: rgba(20,24,31,.7); padding: 6px; border-radius: 99px; z-index: 2; }
.zoomctl button { white-space: nowrap; border: 0; background: transparent; color: #fff; min-width: 38px; height: 34px; border-radius: 99px; font-size: 15px; font-weight: 600; padding: 0 10px; }
.zoomctl button:hover { background: rgba(255,255,255,.18); }
.side { background: #fff; display: flex; flex-direction: column; overflow-y: auto; }
.side header { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); position: relative; }
.side header span { font-size: 12px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 5px; padding: 2px 7px; }
.side header h3 { margin: 8px 34px 2px 0; font-size: 18px; line-height: 1.2; }
.side header small { color: var(--mute); }
.side .close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--paper); font-size: 18px; }
.side section { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.side h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); }
.side .acts { padding: 0; }
.side .act { padding: 10px 6px; font-size: 14px; }
.side textarea { width: 100%; min-height: 120px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.side textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.side .hint { font-size: 12.5px; color: var(--mute); margin: 8px 0 0; }
.others { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.others li { background: var(--paper); border-radius: 8px; padding: 9px 11px; font-size: 13.5px; }
.others b { display: block; font-size: 12.5px; }
.others em { font-style: normal; font-weight: 600; }
.others em.like { color: var(--like); } .others em.improve { color: var(--improve); }

/* ---------- sign-in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--blue); position: relative; overflow: hidden; padding: 24px; }
.login::before, .login::after { content: ""; position: absolute; border-radius: 46% 54% 60% 40% / 52% 44% 56% 48%; }
.login::before { width: 520px; height: 460px; right: -160px; top: -180px; background: var(--violet); }
.login::after { width: 380px; height: 340px; left: -140px; bottom: -150px; background: var(--crimson); }
.login .blob { position: absolute; width: 190px; height: 170px; left: 180px; bottom: -70px; background: var(--orange); border-radius: 58% 42% 45% 55% / 48% 58% 42% 52%; }
.panel { position: relative; z-index: 1; background: #fff; border-radius: 18px; padding: 34px 34px 30px; width: min(440px, 100%); box-shadow: 0 24px 60px rgba(0,30,90,.35); }
.panel .brand { color: var(--blue); }
.panel .brand small { border-color: var(--line); color: var(--mute); opacity: 1; }
.panel h1 { font-size: 24px; margin: 22px 0 8px; letter-spacing: -.02em; line-height: 1.15; }
.panel p { margin: 0 0 18px; color: var(--mute); }
.panel label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
.panel input[type=email] { width: 100%; border: 1px solid #cfd4dc; border-radius: 10px; padding: 12px 14px; font-size: 16px; }
.panel input[type=email]:focus { outline: 2px solid var(--blue); border-color: transparent; }
.panel button { width: 100%; margin-top: 14px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 700; padding: 13px; font-size: 16px; }
.panel button:hover { background: var(--blue-deep); } .panel button:disabled { opacity: .6; cursor: default; }
.msg { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.msg.ok { background: #eaf6ee; color: #17623a; } .msg.err { background: #fdecec; color: #a12828; }

@media (max-width: 900px) {
  .top, .bar { padding-left: 16px; padding-right: 16px; } main { padding: 4px 16px 60px; }
  .who { position: static; text-align: left; margin-bottom: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .act { font-size: 12px; padding: 7px 3px; } .progress i { display: none; }
  .lb { grid-template-columns: 1fr; grid-template-rows: 55vh 1fr; }
}

/* ---------- area notes ---------- */
.marks { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.mark { position: absolute; border: 2px solid var(--orange); border-radius: 4px; pointer-events: auto; cursor: pointer;
        box-shadow: 0 0 0 1px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.25); transition: background .12s; }
.mark.other { border-color: #fff; border-style: dashed; }
.mark.hl { background: rgba(255,159,0,.22); }
.mark.draft { border-style: dashed; pointer-events: none; background: rgba(255,159,0,.12); }
.mark b { position: absolute; left: 3px; top: 3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center;
          background: var(--orange); color: var(--ink); font-size: 12px; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.mark.other b { background: #fff; }
.stage.drawing { cursor: crosshair; } .stage.drawing .mark { pointer-events: none; }
.zoomctl button.area.on { background: var(--orange); color: var(--ink); }
.areabtn { width: 100%; border: 1px dashed var(--blue); background: #f0f6ff; color: var(--blue); border-radius: 8px; padding: 10px; font-weight: 600; font-size: 14px; }
.areabtn.on { background: var(--orange); border: 1px solid var(--orange); color: var(--ink); }
.notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.notes:empty { display: none; }
.notes li { display: grid; grid-template-columns: 24px 1fr; gap: 4px 10px; align-items: start; background: var(--paper); border: 1px solid transparent; border-radius: 8px; padding: 9px 11px; font-size: 13.5px; }
.notes li.hl { border-color: var(--orange); }
.notes li > :not(.num) { grid-column: 2; }
.notes .num { grid-row: 1 / span 3; width: 24px; height: 24px; border-radius: 12px; background: var(--orange); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.notes li.other .num { background: #fff; border: 1px solid var(--line); }
.notes b { font-size: 12.5px; }
.side .notes textarea { min-height: 70px; margin-top: 2px; background: #fff; }
.notes .del { justify-self: start; border: 0; background: none; color: var(--crimson); font-size: 12.5px; padding: 0; }
@media (max-width: 900px) { .zoomctl button.area { font-size: 13px; } }
