/* Hodion v11.2: picture menu, stickers, banners, wider task field, item actions. */

/* ---------- stickers ---------- */
.stk { display: inline-block; flex: 0 0 auto; width: 44px; height: 44px; line-height: 0; }
.stk svg { width: 100%; height: 100%; display: block; overflow: visible; }
.stk .glyph { fill: #fff; stroke: rgba(0, 0, 0, 0.18); stroke-width: 1.2; stroke-linejoin: round; paint-order: stroke; }
.stk .glyph .gs { stroke: #fff; fill: none; stroke-linecap: round; paint-order: normal; }
.stk .glyph .g2 { fill: #fff; opacity: 0.78; }
.stk .glyph .g3 { fill: var(--g2); stroke: none; }
.stk .glyph .g3s { stroke: var(--g2); }
.stk-sm { width: 30px; height: 30px; }
.stk-md { width: 38px; height: 38px; }
.stk-lg { width: 60px; height: 60px; }
.stk-tab { width: 28px; height: 28px; transition: transform var(--t-mid, 200ms) var(--ease, ease); }

/* ---------- More: hero cards ---------- */
#v112-hub { display: grid; gap: 1rem; margin-bottom: 1.2rem; }
.v112-heroes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.4rem), 1fr)); gap: 0.65rem; }
.v112-hero.tile {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 0.6rem; align-items: center;
  min-height: 104px; padding: 1.75rem 0.75rem 0.8rem; border: 0; border-radius: 22px; color: #fff; text-align: left;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 55%), linear-gradient(160deg, var(--hero-a), var(--hero-b));
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.22), 0 10px 22px rgba(0, 0, 0, 0.14);
}
.v112-hero.tile:first-child { grid-column: 1 / -1; min-height: 116px; }
.v112-hero .stk { grid-row: 1 / 3; }
.v112-hero .v112-label { font-size: 1.08rem; font-weight: 900; line-height: 1.15; align-self: end; overflow-wrap: anywhere; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.v112-hero .v112-sub { font-size: 0.78rem; font-weight: 700; opacity: 0.95; align-self: start; line-height: 1.2; overflow-wrap: anywhere; }
.v112-hero:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.22); }
@media (hover: hover) { .v112-hero:hover { filter: brightness(1.05); } }
.v112-badge {
  position: absolute; top: 0.45rem; right: 0.45rem; padding: 0.12rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 900; line-height: 1.3;
  background: #fff; color: #18332a; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); white-space: nowrap; max-width: calc(100% - 0.9rem); overflow: hidden; text-overflow: ellipsis;
}
.v112-badge[hidden] { display: none; }
.v112-badge.is-new { background: #ffe36e; color: #3a2a00; }
.v112-badge.is-done { background: #c9f5dc; color: #0b4a30; }
.v112-badge.is-spark { background: #fff4c9; color: #4a3500; }

/* ---------- More: groups with banners ---------- */
.v112-group { margin: 0; }
.v112-group-title {
  display: flex; align-items: center; gap: 0.55rem; margin: 0.2rem 0 0.6rem; padding: 0.4rem 0.75rem 0.4rem 0.45rem; border-radius: 16px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--band) 22%, transparent), transparent 85%);
  font-size: 1rem; font-weight: 900; color: var(--ink); text-transform: none; letter-spacing: 0;
}
details.v112-group > summary { list-style: none; cursor: pointer; }
details.v112-group > summary::-webkit-details-marker { display: none; }
details.v112-group > summary .v112-group-title::after { content: "\25BE"; margin-left: auto; font-size: 1rem; transition: transform 200ms; }
details.v112-group[open] > summary .v112-group-title::after { transform: rotate(180deg); }
.v112-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 6.1rem), 1fr)); gap: 0.55rem; }
.v112-tile.tile {
  position: relative; align-items: center; justify-content: flex-start; text-align: center; gap: 0.35rem; min-height: 96px; padding: 0.7rem 0.35rem 0.55rem;
  border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--tile-c) 45%, var(--line-soft));
  background: linear-gradient(180deg, color-mix(in srgb, var(--tile-c) 16%, var(--surface)), var(--surface) 70%);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--tile-c) 40%, transparent);
}
.v112-tile .v112-label { font-size: 0.8rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; }
.v112-tile .v112-badge { top: 0.3rem; right: 0.3rem; font-size: 0.66rem; }
.v112-tile:active { transform: translateY(2px); box-shadow: none; }
.v112-group #glossary { margin-top: 0.6rem; }
.tester-only[hidden] { display: none !important; }
@media (min-width: 1024px) {
  .v112-heroes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v112-hero.tile:first-child { grid-column: span 2; }
  .v112-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- section banners ---------- */
h2.v112-banner {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.8rem 0.45rem 0.5rem; border-radius: 20px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--band) 26%, transparent), color-mix(in srgb, var(--band2) 10%, transparent) 70%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--band) 30%, transparent);
}

/* ---------- tab bar stickers ---------- */
.tabbar button .stk-tab { filter: saturate(0.55); opacity: 0.85; }
.tabbar button[aria-current="page"] .stk-tab { filter: none; opacity: 1; transform: translateY(-2px) scale(1.12); }
.tabbar button[aria-current="page"] span:not(.stk) { font-weight: 900; }

/* ---------- B-6: a wide task field on phones ---------- */
@media (max-width: 1023px) {
  #quick-add { grid-template-columns: minmax(0, 1fr); position: relative; }
  #quick-add #quick-title { grid-column: 1; grid-row: 1; width: 100%; min-height: 48px; padding-right: 9.4rem; }
  #quick-add > .button { grid-column: 1; grid-row: 1; justify-self: end; align-self: center; width: 42px; min-width: 42px; min-height: 42px; height: 42px; padding: 0; border-radius: 12px; }
  #quick-add #voice-quick { margin-right: 3rem; }
  #quick-add button[type="submit"] { margin-right: 0.2rem; }
  #quick-add #new-task { margin-right: 6rem; }
  #quick-add button[type="submit"] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #quick-add #quick-preview { grid-row: 2; }
}

/* ---------- B-3: item actions ---------- */
.item-actions { gap: 0.4rem; margin-top: 0.5rem; }
.button.small { min-height: 40px; padding: 0.3rem 0.8rem; font-size: 0.85rem; }
.item-actions .danger-quiet, #edit-delete { margin-top: 0; }
#edit-delete { margin-right: auto; }
.note-title-btn { cursor: pointer; }
.note-card .check { display: flex; gap: 0.4rem; align-items: center; cursor: pointer; }
.note-card .check input { width: 22px; height: 22px; }
.habit-rename { width: 100%; }
.habit-archive summary { cursor: pointer; font-weight: 800; }
.archive-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }

/* ---------- B-13: done today ---------- */
.v112-done { margin: 0.4rem 0 0.6rem; padding: 0.5rem 0.8rem; border-radius: var(--radius-sm, 12px); background: var(--surface); border: 1.5px dashed var(--line-soft); }
.v112-done summary { cursor: pointer; font-weight: 800; color: var(--muted); }
.v112-done ul { margin: 0.4rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.v112-done li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.v112-done li span { text-decoration: line-through; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- B-8: theme preview ---------- */
.shop-preview.theme-preview { position: relative; border: 3px solid var(--prev); border-radius: 16px; overflow: hidden; }
.shop-preview.theme-preview .swatch { position: absolute; right: 6px; bottom: 6px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; }

@media (prefers-reduced-motion: reduce) {
  .stk-tab, .v112-hero, .v112-tile, details.v112-group > summary .v112-group-title::after { transition: none !important; }
  .tabbar button[aria-current="page"] .stk-tab { transform: none; }
}
html.less-motion .tabbar button[aria-current="page"] .stk-tab { transform: none; }
.shop-preview.theme-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--prev), transparent 65%); opacity: 0.38; pointer-events: none; }
.shop-preview.theme-preview .swatch { z-index: 1; }
.v11-gift .v11-art .shop-preview { width: 96px; height: 96px; grid-row: auto; }
.v11-gift .v11-art .shop-preview svg { width: 100%; height: 100%; }
/* smaller hero cards stack the sticker above the name, so long words like "Статистика" stay whole */
.v112-hero.tile:not(:first-child) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; align-content: start; row-gap: 0.25rem; padding-top: 0.75rem; }
.v112-hero.tile:not(:first-child) .stk { grid-row: auto; width: 50px; height: 50px; }
.v112-hero.tile:not(:first-child) .v112-label { align-self: start; overflow-wrap: normal; word-break: normal; }
.v112-hero .v112-label { hyphens: manual; }
