/* My Christmas Tree — self-hosted fonts, social share sheet, music + language chrome
   Loaded after styles.css. All fonts are local: no third-party request, works offline. */

@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("../fonts/cormorant-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("../fonts/cormorant-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ *
 * Top-bar controls: music + language
 * ------------------------------------------------------------------ */
.chrome-btn {
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-soft); background: rgba(247, 241, 230, .04);
  color: var(--ivory-dim); font-size: .95rem; line-height: 1;
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.chrome-btn:hover { background: rgba(247, 241, 230, .11); color: var(--ivory); transform: translateY(-1px); }
.chrome-btn.active { color: var(--gold-bright); border-color: rgba(219, 185, 121, .5); background: rgba(219, 185, 121, .11); }
.chrome-btn .note { display: inline-block; }
.chrome-btn.on .note { animation: note-bob 2.4s ease-in-out infinite; }
@keyframes note-bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-2px) rotate(7deg); } }
.chrome-btn.muted { opacity: .55; }
.lang-btn { width: auto; min-width: 46px; border-radius: 18px; padding: 0 11px; gap: 5px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; }
.lang-btn .globe { font-size: .85rem; font-weight: 400; }

/* ------------------------------------------------------------------ *
 * Share sheet — mobile-first, mirrors the reference card 1:1
 * ------------------------------------------------------------------ */
.share-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 18px; padding-bottom: calc(18px + var(--safe-b));
  background: rgba(3, 12, 10, .68);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  animation: sh-fade .2s ease both;
}
@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }
.share-card {
  position: relative; width: min(430px, 100%);
  max-height: calc(100dvh - 36px); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 22px 22px;
  border-radius: 24px;
  background: linear-gradient(170deg, #1e4036 0%, #16342c 46%, #123029 100%);
  border: 1px solid rgba(247, 241, 230, .10);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255, 255, 255, .05);
  color: #fff; font-family: var(--sans);
  animation: sh-rise .28s cubic-bezier(.2, .9, .25, 1) both;
  -webkit-overflow-scrolling: touch;
}
@keyframes sh-rise { from { opacity: 0; transform: translateY(18px) scale(.975); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .share-overlay, .share-card { animation: none; }
  .chrome-btn.on .note { animation: none; }
}
.share-close {
  position: absolute; top: 15px; right: 15px; width: 32px; height: 32px;
  border-radius: 50%; display: grid; place-items: center;
  color: rgba(255, 255, 255, .72); font-size: 1.25rem; line-height: 1;
  background: rgba(255, 255, 255, .06); transition: background .2s, color .2s;
}
.share-close:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.share-illustration { width: 104px; height: 116px; margin: 12px auto 6px; display: block; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .3)); }
.share-title { font-size: 1.48rem; font-weight: 800; letter-spacing: -.025em; text-align: center; margin: 4px 0 5px; line-height: 1.2; }
.share-sub { font-size: .88rem; line-height: 1.5; color: rgba(255, 255, 255, .66); text-align: center; margin: 0 auto 16px; max-width: 320px; }

/* Mode switch: decorate together / just to see */
.share-modes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 12px;
  border-radius: 13px; background: rgba(4, 20, 16, .46);
  border: 1px solid rgba(255, 255, 255, .07);
}
.share-mode {
  border-radius: 10px; padding: 8px 6px 7px; text-align: center;
  color: rgba(255, 255, 255, .62); font-size: .76rem; font-weight: 700; line-height: 1.25;
  transition: background .2s, color .2s, box-shadow .2s;
}
.share-mode .mi { display: block; font-size: .95rem; margin-bottom: 2px; font-weight: 400; }
.share-mode.on { background: rgba(247, 241, 230, .13); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .17); }
.share-mode:hover:not(.on) { color: #fff; }
.share-mode-hint { text-align: center; font-size: .71rem; color: rgba(255, 255, 255, .48); margin: -5px 0 13px; min-height: 15px; }

/* Link field */
.share-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 52px; padding: 0 14px; margin-bottom: 11px;
  border-radius: 13px; background: rgba(5, 24, 20, .60);
  border: 1px solid rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .88); font-size: .89rem; font-weight: 600;
  text-align: left; transition: border-color .2s, background .2s;
}
.share-link:hover { border-color: rgba(219, 185, 121, .48); background: rgba(5, 24, 20, .8); }
.share-link svg { flex: none; opacity: .62; }
.share-link .u { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .01em; }
.share-link .cp { flex: none; font-size: .72rem; font-weight: 700; color: var(--gold-bright); }
.share-copy {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 52px; border-radius: 13px;
  background: #be4a52; color: #fff; font-size: .95rem; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 8px 20px rgba(190, 74, 82, .24);
  transition: background .2s, transform .15s, box-shadow .2s;
}
.share-copy:hover { background: #cf565e; box-shadow: 0 10px 26px rgba(190, 74, 82, .34); }
.share-copy:active { transform: scale(.985); }
.share-copy.done { background: #2f7a58; box-shadow: 0 8px 20px rgba(47, 122, 88, .25); }
.share-rule { height: 1px; margin: 20px 0 16px; background: rgba(255, 255, 255, .12); }
.share-via { text-align: center; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .44); margin-bottom: 14px; }

/* Brand circles */
.share-socials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 4px; }
.share-social { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 2px 0; color: rgba(255, 255, 255, .86); }
.share-social .bubble {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.share-social:hover .bubble { transform: translateY(-3px) scale(1.05); box-shadow: 0 9px 20px rgba(0, 0, 0, .32); filter: brightness(1.07); }
.share-social:active .bubble { transform: scale(.95); }
.share-social .bubble svg { width: 26px; height: 26px; display: block; }
.share-social .nm { font-size: .66rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; text-align: center; }
.share-social[data-platform="whatsapp"] .bubble { background: #25D366; }
.share-social[data-platform="messenger"] .bubble { background: linear-gradient(145deg, #00B2FF 0%, #006AFF 48%, #A033FF 100%); }
.share-social[data-platform="threads"] .bubble { background: #101010; border: 1px solid rgba(255, 255, 255, .16); }
.share-social[data-platform="x"] .bubble { background: #000; border: 1px solid rgba(255, 255, 255, .16); }
.share-social[data-platform="telegram"] .bubble { background: linear-gradient(145deg, #2AABEE, #229ED9); }
.share-social[data-platform="instagram"] .bubble { background: linear-gradient(145deg, #F9CE34 0%, #EE2A7B 52%, #6228D7 100%); }
.share-social[data-platform="facebook"] .bubble { background: #1877F2; }
.share-social[data-platform="sms"] .bubble { background: #34C759; }

/* secondary ways */
.share-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 18px; }
.share-more button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 20px; font-size: .72rem; font-weight: 600;
  color: rgba(255, 255, 255, .70); border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04); transition: color .2s, border-color .2s, background .2s;
}
.share-more button:hover { color: #fff; border-color: rgba(219, 185, 121, .5); background: rgba(219, 185, 121, .10); }
.share-foot { text-align: center; font-size: .67rem; line-height: 1.45; color: rgba(255, 255, 255, .38); margin: 15px 6px 0; }

@media (max-width: 380px) {
  .share-card { padding: 16px 15px 18px; border-radius: 20px; }
  .share-social .bubble { width: 42px; height: 42px; }
  .share-social .bubble svg { width: 23px; height: 23px; }
  .share-social .nm { font-size: .6rem; }
  .share-title { font-size: 1.3rem; }
}

/* ------------------------------------------------------------------ *
 * Language picker (same overlay language, lighter card)
 * ------------------------------------------------------------------ */
.lang-card {
  width: min(360px, 100%); max-height: min(560px, 82dvh); overflow-y: auto;
  padding: 20px 16px 14px; border-radius: 22px;
  background: linear-gradient(170deg, #1e4036, #123029);
  border: 1px solid rgba(247, 241, 230, .12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .58);
  color: #fff; font-family: var(--sans);
}
.lang-card h3 { font-family: var(--sans); font-size: 1.1rem; font-weight: 800; text-align: center; margin: 0 0 4px; }
.lang-card .sub { text-align: center; font-size: .73rem; color: rgba(255, 255, 255, .5); margin-bottom: 14px; }
.lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.lang-item {
  display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .035);
  color: rgba(255, 255, 255, .85); text-align: left; transition: background .2s, border-color .2s;
}
.lang-item:hover { background: rgba(255, 255, 255, .09); }
.lang-item.on { border-color: rgba(219, 185, 121, .6); background: rgba(219, 185, 121, .13); }
.lang-item .code { font-size: .63rem; font-weight: 800; letter-spacing: .06em; color: var(--gold-bright); min-width: 22px; }
.lang-item .nm { font-size: .8rem; font-weight: 600; line-height: 1.2; }
.lang-item .tick { margin-left: auto; color: var(--gold-bright); font-size: .8rem; }
.lang-note { text-align: center; font-size: .68rem; color: rgba(255, 255, 255, .38); margin-top: 13px; }

