/* Phone tree only. Desktop chronicle circles and dust are reused below. */
.em-phone { height: 100%; height: 100dvh; overflow: hidden; position: relative; background: #070809; }
.em-home { position: relative; height: 100%; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #454648 transparent; padding-bottom: env(safe-area-inset-bottom); }
.em-phone button, .em-phone a, .em-loading button, .em-loading a { -webkit-tap-highlight-color: transparent; }
.em-phone :focus-visible, .em-loading :focus-visible { outline: 2px solid #deded9; outline-offset: 3px; }
/* The desktop's bust, large on the left and faded, as on the desktop (which recedes it to ~.24 below 820 px). */
.em-backdrop { position: absolute; inset: 0 0 auto; height: 560px; overflow: hidden; pointer-events: none; }
.em-backdrop img { position: absolute; height: 560px; left: -150px; top: 0; opacity: .22;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 92%); -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 92%); }
/* Header like the desktop: crest | THE EMPIRE (centred, wide tracking, the one gold word) | quiet icons. */
.em-header { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 4px max(18px, env(safe-area-inset-left)); }
.em-crest { justify-self: start; height: 42px; width: auto; object-fit: contain; filter: drop-shadow(0 4px 12px #000a); }
.em-title { justify-self: center; font-size: 12.5px; font-weight: 700; letter-spacing: .42em; text-indent: .42em; padding: 12px 4px; }
.em-inbox { position: relative; }
.em-count { position: absolute; top: 7px; right: 5px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  font: 600 9px/15px var(--mono); color: #0b0c0e; background: #d9d9d3; }
/* The ring: the desktop wheel at phone size. */
.em-ring { position: relative; z-index: 1; padding: 46px 0 16px; }   /* lower than the header, as in the app */
.em-ring-stage { height: 158px; }
.em-ring-stage .ring-scene { height: 158px; transform: none; --front-y: 60%; }
.em-ring-stage .ring-tab { width: 236px; height: 82px; gap: 13px; padding: 0 16px; }
.em-ring-stage .tab-logo { width: 50px; height: 50px; }
.em-ring-stage .tab-mono { width: 46px; height: 46px; font-size: 22px; }
.em-ring-stage .tab-name { font-size: 15px; }
.em-ring-stage .ring-hint { display: none; }
/* Holding a tab opens its page: no callout, selection or image drag on the long press. */
.em-ring-stage .ring-tab { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.em-ring-stage .ring-tab img { -webkit-user-drag: none; pointer-events: none; }
.em-ring-stage .ring-tab.is-pressed { transition: transform .18s ease-out; }
.ring-tab-add { border-style: dashed; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.015); box-shadow: none; }
.ring-tab-add.is-front { border-color: rgba(255,255,255,.34); }
.tab-plus { font-weight: 300; font-size: 26px; color: #d6d6d0; border-style: dashed; }
.tab-add-label { font-size: 13px; letter-spacing: .04em; color: #d0d1cc; }
.em-ring-line { min-height: 18px; margin: 4px 40px 0; text-align: center; font-size: 12.5px; line-height: 1.6; color: #8f9390; }
.em-ring-line.is-live { font: 11px/1.6 var(--mono); letter-spacing: .02em; color: #b5b8b4; }
.em-header-actions { display: flex; gap: 2px; align-items: center; }
.em-icon-button { display: inline-flex; justify-content: center; align-items: center; width: 44px; height: 44px; flex: none; color: #a8a9a7; border-radius: 12px; }
.em-icon-button:hover, .em-icon-button.is-active { color: #eeeee9; background: #ffffff09; }
.em-icon-button:disabled { opacity: .25; cursor: default; }
.em-monogram { width: 48px; height: 48px; border: 1px solid #ffffff22; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #e6e6df; }
.em-status { font: 9px var(--mono); letter-spacing: .12em; color: #c5ae7e; }
.em-news { margin: 0 26px; padding-top: 23px; border-top: 1px solid #ffffff10; }
.em-section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.em-news .em-section-heading { margin-bottom: 18px; }
.em-section-heading h2, .em-detail-section h2 { font-size: 13px; font-weight: 500; color: #c2c4bf; margin: 0; }
/* Same desktop .log-bust circles / .log-* text; only their layout turns vertical, and smaller than the desktop's
   (38 px coins instead of 50). The shared GoldDust canvas draws its line at lineY=27, the coins' centre. */
.em-timeline-wrap { position: relative; }
.em-timeline-wrap > .log-dust { width: 60px; }
.em-timeline { list-style: none; position: relative; z-index: 1; margin: 0; padding: 0; }
.em-timeline .log-node { display: block; position: relative; text-align: left; min-height: 58px; padding: 0 0 20px 60px; }
.em-timeline .log-bust { position: absolute; top: 0; left: 8px; margin-top: 0; width: 38px; height: 38px;
  box-shadow: 0 0 12px -2px rgba(255,206,112,0.6), 0 0 3px rgba(255,232,170,0.5), inset 0 0 7px rgba(255,224,150,0.22); }
.em-timeline .log-bust img { width: 80%; height: 80%; }
.em-timeline .log-bust .em-monogram { border: none; width: 84%; height: 84%; font-size: 16px; }
.em-timeline .log-meta { margin-top: 0; min-height: 18px; align-items: center; flex-wrap: wrap; gap: 6px; }
.em-timeline .log-date { color: #858a8a; font-size: 8.5px; }
.em-timeline .log-proj { color: #a7aba7; font-size: 8.5px; font-weight: 500; letter-spacing: .03em; }
.em-timeline .log-text { display: block; overflow: visible; margin: 3px 0 0; font-size: 11.5px; line-height: 1.6; color: #aaaeaa; overflow-wrap: anywhere; }
.em-empty { font-size: 12px; color: #9b9f9d; line-height: 1.8; padding: 12px 0; }
.em-home > .em-empty { margin: 0 26px; }
/* The end of the page: the privacy policy and imprint, and on a localhost preview which sample is shown. The links'
   padding gives them a taller tap area; the footer's own padding is smaller by the same amount. */
.em-home-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 26px;
  padding: 10px 0 15px; border-top: 1px solid #ffffff09; color: #626768; font-size: 10px; }
.em-legal { font-size: 11px; letter-spacing: .02em; }
.em-legal a { display: inline-block; padding: 10px 2px; color: #8f9390; transition: opacity .15s; }
.em-legal a:active { opacity: .6; }
.em-overlay { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; background: #0009; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.em-dialog { width: 100%; height: 100%; display: flex; flex-direction: column; outline: none; background: #0a0c0e; animation: em-enter .25s ease-out; }
.em-dialog-header { padding: calc(12px + env(safe-area-inset-top)) 18px 12px 26px; display: flex; align-items: center; justify-content: space-between; flex: none; border-bottom: 1px solid #ffffff0c; }
.em-dialog-header > span { font-size: 13px; font-weight: 500; color: #b8bcb8; }
.em-dialog-content { overflow-y: auto; padding: 26px max(26px, env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) max(26px, env(safe-area-inset-left)); scrollbar-width: thin; }
.em-dialog-content > .em-news { margin: 28px 0 0; }
.em-detail-hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0 0 24px; }
.em-detail-mark { width: 72px; height: 80px; display: flex; align-items: center; justify-content: center; margin: 0 0 14px; color: #bcc0bd; }
.em-detail-mark img { width: 100%; height: 100%; object-fit: contain; }
.em-detail-hero h1 { position: relative; color: #eeeee8; font-size: 26px; font-weight: 500; line-height: 1.2; margin: 0 0 12px; overflow-wrap: anywhere; }
.em-detail-link { display: flex; flex-direction: column; align-items: center; color: inherit; text-decoration: none; transition: opacity .15s; }
.em-detail-link:active { opacity: .6; }
.em-detail-arrow { position: absolute; left: 100%; top: 50%; transform: translate(7px, -50%); display: flex; color: #8f9390; }
.em-detail-blurb { font-size: 13px; line-height: 1.7; color: #a9aeaa; margin: 18px 0 0; }
.em-detail-live { color: #c4c8c2; font: 11px var(--mono); margin: 18px 0 0; }
.em-primary, .em-secondary, .em-danger { min-height: 46px; border-radius: 11px; padding: 12px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.em-primary { color: #141617; background: #eeeee8; border: 1px solid #eeeee8; }
.em-secondary { color: #c0c4bf; border: 1px solid #ffffff20; background: #ffffff04; }
.em-danger { color: #e4aaaa; border: 1px solid #bc6d6d44; background: #5e29292b; }
.em-primary:hover { background: #fff; }
.em-primary:disabled, .em-secondary:disabled, .em-danger:disabled { opacity: .5; cursor: wait; }
.em-detail-section { margin: 28px 0; }
.em-detail-section p, .em-detail-section li { font-size: 13px; color: #adb2ad; line-height: 1.85; }
.em-detail-section p { margin: 13px 0 0; }
.em-detail-section ul { list-style: none; margin: 14px 0 0; padding: 0; }
.em-detail-section li { display: flex; align-items: baseline; gap: 10px; margin: 0 0 11px; }
.em-detail-section li svg { flex: none; color: #8c9391; position: relative; top: 3px; }
/* A ring app's install link (TestFlight while testing), under the province's name. */
.em-install { display: flex; width: 100%; text-decoration: none; }
.em-accounts { display: flex; flex-direction: column; gap: 18px; }
.em-account, .em-catalog-card { padding: 20px; border: 1px solid #ffffff16; border-radius: 17px;
  background: linear-gradient(135deg, #ffffff06, transparent), #111417; box-shadow: inset 0 1px 0 #ffffff07; }
.em-account-top { display: flex; gap: 12px; align-items: center; }
.em-account-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #ffffff06; border: 1px solid #ffffff17; color: #c3c9c1; font-size: 14px; }
.em-account-top > div { min-width: 0; }
.em-account h2 { font-size: 15px; font-weight: 500; color: #e0e4dc; margin: 0 0 5px; }
.em-account-top p { font-size: 11px; color: #969e97; margin: 0; overflow-wrap: anywhere; }
.em-account-date { margin: 20px 0; color: #879089; font-size: 10px; display: flex; gap: 12px; flex-wrap: wrap; }
.em-account-date time { font-family: var(--mono); font-size: 9px; }
.em-actions { display: flex; gap: 10px; }
.em-actions > button { flex: 1; }
.em-decline-confirm p { color: #c6b1ab; font-size: 12px; line-height: 1.7; }
.em-empty-state { padding: 25px 8px 30px; text-align: center; }
.em-empty-state > svg { color: #a0a9a1; margin-bottom: 12px; }
.em-empty-state h2 { color: #c9cfc5; font-size: 15px; font-weight: 500; }
.em-empty-state p { font-size: 12px; color: #969f96; line-height: 1.8; }
.em-error { padding: 14px; border: 1px solid #cf8f7833; background: #3a222230; border-radius: 10px; color: #d9b4a6; font-size: 12px; line-height: 1.7; }
.is-sheet .em-dialog { height: auto; max-height: calc(100% - env(safe-area-inset-top) - 50px); border-radius: 22px 22px 0 0; border: 1px solid #ffffff20; border-bottom: none; }
.em-sheet-handle { width: 32px; height: 3px; border-radius: 2px; background: #ffffff32; margin: 10px auto 0; flex: none; }
.is-sheet .em-dialog-header { padding-top: 3px; }
.is-sheet .em-dialog-content { padding-top: 22px; }
.em-catalog-head { display: flex; align-items: center; gap: 15px; }
.em-catalog-mark { width: 48px; height: 54px; display: flex; justify-content: center; align-items: center; }
.em-catalog-mark img { width: 100%; height: 100%; object-fit: contain; }
.em-catalog-card h2 { font-size: 18px; font-weight: 500; color: #e4e9df; margin: 0 0 8px; }
.em-catalog-card .em-primary { width: 100%; margin-top: 20px; }
.em-catalog-blurb { font-size: 12px; line-height: 1.7; color: #a3a9a4; margin: 14px 0 0; }
/* Instead of the button: asked (waiting for approval, the one quiet accent) or not open for requests yet. */
.em-catalog-state { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; margin: 20px 0 0;
  border: 1px dashed #ffffff1c; border-radius: 11px; font-size: 12px; color: #8f9590; }
.em-catalog-state.is-asked { color: #c5ae7e; border: 1px solid #c5ae7e40; background: #c5ae7e0a; }
.em-catalog-card + .em-catalog-card { margin-top: 14px; }
.em-sr { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.em-loading { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 30px; text-align: center; }
.em-loading > img { width: 70px; height: 90px; object-fit: contain; }
.em-loading h1 { font-size: 18px; letter-spacing: .22em; }
.em-loading p { font-size: 13px; line-height: 1.8; color: #a0a79f; }
@keyframes em-enter { from { opacity: .3; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 370px) {
          .em-header-actions { gap: 0; }
      .em-timeline .log-node { padding-left: 56px; }
  .em-timeline .log-meta { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .em-dialog { animation: none; }
}
