:root { --bg: #fff7f3; --card: #ffffff; --ink: #4a3b35; --muted: #8a6f66; --rose: #c2577a; --rose-2: #f6d9e1; --line: #f0e0da; }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; font: 17px/1.6 Nunito, system-ui, sans-serif; color: var(--ink); background:
  radial-gradient(1200px 500px at 90% -10%, #ffe4ec 0, transparent 60%),
  radial-gradient(900px 400px at -10% 10%, #fff0e0 0, transparent 60%), var(--bg); min-height: 100vh; }
a { color: var(--rose); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  background: rgba(255, 247, 243, .86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font: 700 34px/1 Caveat, cursive; color: var(--rose); text-decoration: none; white-space: nowrap; }
.logo span { font-size: 22px; margin-left: 4px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.top nav a, .top nav .soon { text-decoration: none; color: var(--ink); padding: 6px 12px; border-radius: 99px; font-weight: 600; font-size: 15px; }
.top nav a:hover, .top nav a.on { background: var(--rose-2); }
.top nav .soon { opacity: .45; cursor: default; }
.top nav .enter { background: var(--rose); color: #fff; }
.me { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; padding: 3px 10px 3px 3px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; }
.me i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: var(--rose); color: #fff; display: grid; place-items: center; font-size: 14px; }
.utable { width: 100%; border-collapse: collapse; } .utable th, .utable td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.utable th { font-size: 13px; color: var(--muted); }
.aform select { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfc; }
.linkbtn { background: none; border: 0; font: 600 15px Nunito, sans-serif; color: var(--muted); cursor: pointer; padding: 6px 10px; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 40px; }
footer { text-align: center; color: var(--muted); font-size: 14px; padding: 20px; }

.dogs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; align-items: start; }
.dog-fors h1, .dog-fors .sec, .dog-fors .year { color: #8a6a2c; }
.whotiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.who { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border: 2px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); background: #fffdfc; transition: transform .15s, border-color .15s; }
.who span { font-size: 34px; } .who small { color: var(--muted); font-size: 13px; }
.who:hover { transform: translateY(-2px); border-color: var(--rose-2); } .who.on { border-color: var(--rose); background: #fff4f7; }
.pwwrap { position: relative; display: block; } .pwwrap input { width: 100%; padding-right: 44px !important; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 20px; cursor: pointer; padding: 4px; line-height: 1; }
.hiddenhint { color: var(--muted); font-size: 15px; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 8px 12px; }
.noportrait { aspect-ratio: 4/3; border-radius: 28px; background: linear-gradient(135deg, #fbefd9, #f3dcae); display: grid; place-items: center; align-content: center; gap: 6px; font-size: 64px; box-shadow: 0 14px 40px rgba(180, 140, 60, .2); }
.noportrait small { font-size: 15px; color: #8a6a2c; }
@media (max-width: 1100px) { .dogs { grid-template-columns: 1fr 1fr; } .dog-fors { grid-column: 1 / -1; } }
.dog .portrait img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 28px; box-shadow: 0 14px 40px rgba(194, 87, 122, .22); }
.dog-susie .portrait img { transform: rotate(-1.5deg); } .dog-tusya .portrait img { transform: rotate(1.5deg); box-shadow: 0 14px 40px rgba(180, 140, 60, .25); }
.dog h1 { font: 700 54px/1 Caveat, cursive; color: var(--rose); margin: 18px 0 8px; }
.dog-tusya h1, .dog-tusya .sec, .dog-tusya .year { color: #b07d2a; }
.dog .about { font-size: 18px; margin: 0 0 22px; }
.dog .albums { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.year { font: 700 30px/1 Caveat, cursive; color: var(--rose); margin: 18px 0 8px; }
.dogpick { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: flex; gap: 18px; flex-wrap: wrap; }
.dogpick legend { font-weight: 600; padding: 0 4px; } .dogpick label { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.hero { display: grid; grid-template-columns: minmax(240px, 420px) 1fr; gap: 32px; align-items: center; margin: 10px 0 40px; }
.hero img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 28px; box-shadow: 0 14px 40px rgba(194, 87, 122, .22); transform: rotate(-2deg); }
.hello h1 { font: 700 64px/1 Caveat, cursive; color: var(--rose); margin: 0 0 12px; }
.hello p { font-size: 19px; max-width: 560px; }
.hello .new { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: inline-block; }
.sec { font: 700 40px/1.1 Caveat, cursive; color: var(--rose); margin: 0 0 14px; }

.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.album { background: var(--card); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: 0 6px 20px rgba(74, 59, 53, .08); transition: transform .2s, box-shadow .2s; }
.album:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 12px 30px rgba(194, 87, 122, .2); }
.cover { aspect-ratio: 4/3; background: var(--rose-2); }
.cover img, .cover video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cover { position: relative; }
.filmbadge { position: absolute; left: 10px; bottom: 8px; font-size: 22px; background: rgba(255,255,255,.88); border-radius: 10px; padding: 1px 6px; line-height: 1.3; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.nophoto { display: grid; place-items: center; height: 100%; font-size: 48px; }
.meta { padding: 10px 14px 14px; display: grid; } .meta span { color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); font-size: 19px; }

.back a { text-decoration: none; font-weight: 600; }
.atitle { font: 700 52px/1.05 Caveat, cursive; color: var(--rose); margin: 6px 0 4px; }
.adate { color: var(--muted); margin: 0 0 10px; } .anote { font-size: 19px; }
.pet { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 8px 14px; margin: 10px 0; box-shadow: 0 4px 14px rgba(194, 87, 122, .1); }
.pet img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); flex: none; }
.flash { background: #e9f6e8; border-radius: 12px; padding: 8px 14px; } .flash.err { background: #fbe9e9; }
.gallery { columns: 4 220px; column-gap: 12px; margin-top: 18px; }
.gallery figure { margin: 0 0 12px; break-inside: avoid; position: relative; }
.gallery img { width: 100%; display: block; border-radius: 14px; cursor: zoom-in; transition: filter .2s; }
.gallery video { width: 100%; display: block; border-radius: 14px; background: #2b211e; }
.gallery img:hover { filter: brightness(1.05) saturate(1.1); }
.ph-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.gallery figure:hover .ph-tools { opacity: 1; }
.ph-tools button { border: 0; background: rgba(255, 255, 255, .9); border-radius: 99px; width: 30px; height: 30px; cursor: pointer; font-size: 15px; }
.owner-links { font-size: 15px; }

.btn { display: inline-block; background: var(--rose); color: #fff; border: 0; border-radius: 99px; padding: 10px 20px; font: 700 16px Nunito, sans-serif; cursor: pointer; }
.upload { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0; }
.progress { color: var(--muted); font-weight: 600; }
.aform { display: grid; gap: 14px; max-width: 520px; background: var(--card); padding: 22px; border-radius: 20px; box-shadow: 0 6px 20px rgba(74, 59, 53, .08); }
.aform label { display: grid; gap: 4px; font-weight: 600; }
.aform input[type=text], .aform input:not([type]), .aform input[type=date], .aform input[type=password], .aform textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfc; }
.aform .chk { grid-template-columns: auto 1fr; align-items: start; column-gap: 10px; }
.aform .chk small { grid-column: 2; font-weight: 400; color: var(--muted); }
.login { margin: 30px auto; }

.lb { position: fixed; inset: 0; background: rgba(30, 20, 18, .92); display: grid; place-items: center; z-index: 50; }
.lb[hidden] { display: none; }
.lb img { max-width: 94vw; max-height: 90vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb button { position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 99px; width: 48px; height: 48px; font-size: 30px; cursor: pointer; }
.lb-x { top: 16px; right: 16px; } .lb-p { left: 16px; top: 50%; } .lb-n { right: 16px; top: 50%; }

@media (max-width: 760px) {
  /* телефон: название одной строкой, под ним меню — всё на виду, при нехватке места переносится на вторую строку */
  .top { padding: 6px 12px; gap: 4px; flex-wrap: wrap; }
  .logo { font-size: 23px; white-space: nowrap; } .logo span { font-size: 16px; }
  .top nav { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 4px; }
  .top nav a, .top nav .soon, .top nav .me, .top nav form { flex: none; white-space: nowrap; }
  .top nav a, .top nav .soon { padding: 3px 9px; font-size: 14px; }
  .me { font-size: 14px; }
  main { padding: 16px; }
  .hero { grid-template-columns: 1fr; gap: 18px; } .hero img { transform: none; }
  .dogs { grid-template-columns: 1fr; gap: 40px; } .dog .portrait img { transform: none !important; } .dog h1 { font-size: 44px; }
  .hello h1 { font-size: 48px; } .gallery { columns: 2 140px; }
  .ph-tools { opacity: 1; }
}

/* «Обновить»: яркая кнопка наверху — подтянуть свежее без «потянуть экран» */
.refresh { background: #e0353b; color: #fff; border: 0; border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 6px rgba(224,53,59,.35); }
.refresh:hover { background: #c4262c; }
.refresh:active { transform: scale(.96); }
