@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

:root {
  font-family: Roboto, Arial, sans-serif;
  color: #202124;
  background: #f8fafd;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #a1c2fa; outline-offset: 2px; }
.shell { max-width: 960px; min-height: 100vh; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; }
header { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8eaed; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #202124; text-decoration: none; font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #1a73e8; color: white; font-size: 22px; line-height: 1; }
.text-button { min-height: 44px; border: 0; background: transparent; color: #1a73e8; font-size: 14px; font-weight: 600; border-radius: 22px; padding: 0 15px; }
.text-button:hover { background: #e8f0fe; }
#home { flex: 1; }
.hero { max-width: 660px; margin: 0 auto; padding: 94px 0 76px; text-align: center; }
.eyebrow { display: inline-block; margin: 0; color: #1a73e8; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.hero h1, .list-top h1 { font-weight: 600; letter-spacing: -.045em; line-height: 1.08; }
.hero h1 { margin: 23px 0 20px; font-size: clamp(44px, 7vw, 70px); }
.hero > p { max-width: 560px; margin: 0 auto; color: #5f6368; font-size: 17px; line-height: 1.65; }
#create-form { margin: 46px auto 0; max-width: 560px; padding: 22px; background: #fff; border: 1px solid #e2e7ef; border-radius: 22px; box-shadow: 0 4px 18px rgba(60,64,67,.05); text-align: left; }
label { display: block; margin-bottom: 10px; color: #3c4043; font-size: 14px; font-weight: 600; }
.inline, .add-row { display: flex; gap: 12px; }
input:not([type=checkbox]) { min-width: 0; min-height: 52px; padding: 0 16px; border: 1px solid #dadce0; border-radius: 12px; background: #fff; color: #202124; font-size: 16px; }
input:not([type=checkbox])::placeholder { color: #80868b; }
input:not([type=checkbox]):focus { border-color: #1a73e8; outline: 2px solid #d2e3fc; outline-offset: 0; }
.inline input { flex: 1; }
button[type=submit] { min-height: 52px; border: 0; border-radius: 12px; padding: 0 22px; background: #1a73e8; color: white; font-size: 15px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 5px rgba(26,115,232,.15); }
button[type=submit]:hover { background: #1765cc; }
.hint { margin-top: 40px !important; max-width: 490px !important; padding: 18px 22px; border-radius: 14px; background: #eef3fb; color: #47617f !important; font-size: 15px !important; }
.decor { margin: 0 auto; max-width: 660px; padding: 20px 0 64px; text-align: center; color: #9aa0a6; font-size: 14px; word-spacing: 12px; }
.decor span { color: #c5cbd2; }
#list { flex: 1; }
.list-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 52px 0 32px; }
.list-top h1 { margin: 12px 0 9px; font-size: clamp(34px, 5vw, 50px); overflow-wrap: anywhere; }
.title-row { display: flex; align-items: center; gap: 5px; }
.icon-button { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: #5f6368; font-size: 22px; }
.icon-button:hover, .action:hover { background: #edf2fb; color: #1a73e8; }
.subhead { margin: 0; color: #5f6368; line-height: 1.5; }
.share { flex: none; min-height: 46px; padding: 0 18px; border: 1px solid #d2e3fc; border-radius: 23px; background: #e8f0fe; color: #1967d2; font-size: 14px; font-weight: 600; }
.share:hover { background: #d2e3fc; }
#add-form { padding: 24px; border: 1px solid #e2e7ef; border-radius: 22px; background: white; box-shadow: 0 4px 18px rgba(60,64,67,.05); }
.item-input-wrap { position: relative; flex: 1; min-width: 0; }
.item-input-wrap input { display: block; width: 100%; }
.add-row #quantity { width: 110px; flex: none; }
.suggestions { position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; right: 0; max-height: 315px; overflow-y: auto; padding: 7px; border: 1px solid #dadce0; border-radius: 16px; background: white; box-shadow: 0 12px 28px rgba(32,33,36,.18); }
.suggestion-option { display: block; width: 100%; min-height: 47px; padding: 10px 14px; border: 0; border-radius: 10px; background: white; color: #202124; text-align: left; font-size: 16px; }
.suggestion-option:hover, .suggestion-option[aria-selected=true] { background: #e8f0fe; color: #174ea6; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 38px 2px 14px; }
.section-head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.section-head span { color: #5f6368; font-size: 14px; }
.items { margin: 0; padding: 0 16px; list-style: none; border: 1px solid #e2e7ef; border-radius: 18px; background: white; }
.item { display: flex; align-items: center; min-height: 70px; border-bottom: 1px solid #edf0f3; }
.item:last-child { border-bottom: 0; }
.item input[type=checkbox] { appearance: none; position: relative; width: 44px; height: 44px; margin: 0 8px 0 0; flex: none; border: 0; background: transparent; cursor: pointer; }
.item input[type=checkbox]::before { content: ''; position: absolute; top: 10px; left: 10px; width: 22px; height: 22px; border: 2px solid #9aa0a6; border-radius: 6px; background: white; }
.item input[type=checkbox]:checked::before { border-color: #1a73e8; background: #1a73e8; }
.item input[type=checkbox]:checked::after { content: '✓'; position: absolute; top: 10px; left: 13px; color: white; font-size: 18px; line-height: 24px; }
.item-main { flex: 1; min-width: 0; padding: 10px 0; }
.item-name { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.item-quantity { margin-left: 10px; color: #5f6368; font-size: 14px; }
.checked .item-name { color: #80868b; text-decoration: line-through; }
.action { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: #737a80; font-size: 21px; }
.done-head { margin-top: 36px; }
.done-head h2 { color: #5f6368; }
.empty { margin: 0; padding: 28px 20px; border: 1px dashed #d7dce2; border-radius: 16px; color: #80868b; background: white; text-align: center; }
#message { min-height: 24px; margin-top: 18px; color: #b3261e; text-align: center; font-size: 14px; }
footer { margin-top: 40px; padding: 24px 0 30px; border-top: 1px solid #e8eaed; color: #9aa0a6; font-size: 13px; text-align: center; }
@media (max-width: 680px) {
  .shell { padding: 0 16px; }
  header { height: 68px; }
  .brand { font-size: 20px; }
  .hero { padding: 72px 0 44px; }
  .hero h1 { font-size: clamp(42px, 10vw, 56px); }
  .hero > p { font-size: 16px; }
  .inline { flex-direction: column; }
  .inline button { width: 100%; }
  .list-top { display: block; margin: 32px 0 24px; }
  .list-top h1 { font-size: clamp(34px, 9vw, 43px); }
  .share { width: 100%; margin-top: 22px; }
  #add-form { padding: 18px; border-radius: 18px; }
  .add-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 1fr); }
  .item-input-wrap { grid-column: 1 / -1; }
  .add-row #quantity { width: 100%; }
  .add-row button { width: 100%; padding: 0 12px; }
  .section-head { margin-top: 30px; }
  .items { padding: 0 8px; }
  .item input[type=checkbox] { margin-right: 2px; }
  .action { width: 44px; }
  .decor { word-spacing: 4px; }
}
@media (max-width: 380px) {
  .shell { padding: 0 12px; }
  .hero { padding-top: 58px; }
  .item-quantity { display: block; margin: 2px 0 0; }
}
