/*
 * Light theme only, deliberately. `color-scheme: light` is what stops the browser
 * auto-darkening form controls, scrollbars and the Google sign-in iframe on a device set to
 * dark mode - without it the page stays white but the inputs come back dark.
 */
:root{
  color-scheme:light;
  --bg:#ffffff;
  --panel:#ffffff;
  --fg:#1a1a1a;
  --mut:#5f6368;
  --line:#dadce0;
  --accent:#1a73e8;
  --err:#b3261e;
  --ok:#1b873f;
  --warn:#8a5300;
  --tint:#f1f3f4;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;font:16px/1.6 system-ui,-apple-system,Segoe UI,sans-serif;
     color:var(--fg);background:var(--bg)}
a{color:var(--accent)}

/* ------------------------------------------ THE SAME PAGE ON EVERY OPERATING SYSTEM
 * A browser's defaults for text and for form controls are really the operating system's
 * defaults, and there are three sets of those. What follows are the differences that were
 * actually visible in the product, each stated once here rather than worked around at the
 * call sites.
 *
 * The TYPEFACE is still the system one on each - a Mac page in San Francisco, a Windows one
 * in Segoe UI. That is deliberate: what has to match between the three is where everything
 * sits and how big it is, and native text at a matched size is better-looking on each than
 * one imposed font would be on two of them.
 */

/* Safari on a phone inflates the text of some blocks and not others when the page is
   rotated, which moves the layout on one platform only. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

/* macOS paints text noticeably heavier than Windows and Linux do. Grayscale smoothing is
   what closes most of that gap, so a weight chosen on one is the weight seen on all three. */
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}

/* SAFARI DOES NOT INHERIT THE PAGE FONT INTO FORM CONTROLS. Every input, select and
   textarea without an explicit font fell back to the system's control font there - smaller,
   a different family, and therefore a different width - which is most of what "it looks
   different on the MacBook" was. Said once, for all of them. */
input,select,textarea,button{font:inherit;letter-spacing:inherit}
textarea{resize:vertical}
input[type=checkbox],input[type=radio]{accent-color:var(--accent)}

/* A <select> is the one control that cannot be styled into agreement: macOS draws a rounded
   pill with a blue chevron button, Windows a flat box, Linux whatever the GTK theme says,
   and all three ignore the height and padding given here. So the native control is taken
   off and the whole thing - border, padding, background and chevron - is drawn by this
   stylesheet, which means one appearance everywhere.

   The full box is stated HERE rather than per form, so a select added anywhere in the app
   is complete the moment it is written; appearance:none with the styling somewhere else is
   how you get a borderless select on the one page that forgot. */
select{-webkit-appearance:none;appearance:none;
  border:1px solid var(--line);border-radius:9px;padding:.6rem 1.9rem .6rem .7rem;
  background-color:var(--panel);color:var(--fg);cursor:pointer;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235f6368' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;
  background-position:right .65rem center;background-size:10px 6px}
select:focus{outline:2px solid var(--accent);outline-offset:-2px}
select:disabled{background-color:var(--tint);color:var(--mut);cursor:not-allowed}
/* The chevron is drawn ON the right-hand padding, so the few places that narrow that padding
   move the chevron with it. Wherever you see one of those two, the other is beside it. */

.center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1.5rem}
.page{max-width:48rem;margin:0 auto;padding:1.5rem}

.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;
      padding:1.75rem;max-width:26rem;width:100%}
.card.wide{max-width:34rem;margin-bottom:1.25rem}
/* The lens above a card heading. Flush left with the heading and the Google button under
   it - everything on this card hangs off the same edge, and a centred mark above a
   left-aligned column is the one item that looks placed by a different hand. */
.markicon{display:block;height:64px;width:64px;margin:0 0 .75rem}
/* Wide enough that icon + label + a 20-character field + the checkbox all fit on
   one line without the row overflowing. */
.card.roomy{max-width:50rem}
/* For a card whose content is a table: it has to be as wide as the column it sits in,
   because a six-column table inside a 34rem card pushes its own content out through the
   border and the frame ends up drawn across the data. */
.card.full{max-width:none;margin-bottom:1.25rem}

h1{font-size:1.4rem;margin:0 0 .5rem}
h2{font-size:1.1rem;margin:0 0 .75rem}
.fine{font-size:.84rem;color:var(--mut);line-height:1.55}
.sep{border-top:1px solid var(--line);margin-top:1.5rem;padding-top:1rem}

/* `hidden` has to actually hide.
   The browser's own [hidden] rule is display:none, and ANY author rule with a display beats
   it - so .btn{display:inline-block} below quietly kept every button a script had hidden on
   screen, including the Save button that autosave replaced and the Filter button on the
   statistics page. Stated once, here, rather than remembered at each call site. */
[hidden]{display:none !important}

.btn{display:inline-block;border:1px solid var(--line);background:var(--panel);color:var(--fg);
     border-radius:9px;padding:.65rem 1.3rem;font:inherit;cursor:pointer;text-decoration:none}
.btn:hover{background:var(--tint)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn.primary:hover{background:#1765cc}

/* The second way into the sign-in page.
   Meta's own blue, because this button is a promise about where it is going to send you,
   and a neutral one makes that promise less clearly. The mark is inline SVG at its natural
   24px with the label beside it; the gap is what stops the two touching at small widths. */
.metabtn{display:flex;align-items:center;justify-content:center;gap:.6rem;width:100%;
         background:#1877F2;border-color:#1877F2;color:#fff}
.metabtn:hover{background:#1465d8}
.metabtn svg{flex:none}

/* "or", with a rule through it. The pseudo-elements are the two halves of the line, so the
   word sits in a gap rather than on top of a border it has to mask. */
.orline{display:flex;align-items:center;gap:.75rem;margin:1rem 0;color:var(--mut);
        font-size:.85rem}
.orline::before,.orline::after{content:"";flex:1;height:1px;background:var(--line)}

.addr{display:flex;align-items:stretch;border:1px solid var(--line);border-radius:9px;
      overflow:hidden;margin:.5rem 0;background:var(--panel)}
.addr input{flex:1;min-width:0;border:0;padding:.7rem .8rem;font:inherit;
            background:var(--panel);color:var(--fg)}
.addr input:focus{outline:2px solid var(--accent);outline-offset:-2px}
.suffix{display:flex;align-items:center;padding:0 .8rem;background:var(--tint);
        color:var(--mut);white-space:nowrap}
.subform{margin:1rem 0 0}

.msg{border-radius:9px;padding:.6rem .8rem;font-size:.88rem;margin:.6rem 0}
.msg.err{background:#fce8e6;color:var(--err)}
.msg.ok{background:#e6f4ea;color:var(--ok)}
/* A standing rule rather than the result of something just done - the market's content
   policy is the only one so far. Amber because it is neither a failure nor a success. */
.msg.warn{background:#fef7e0;color:var(--warn)}

.addrbig{font-size:1.15rem;font-weight:600;margin:.25rem 0 .75rem;word-break:break-all}
.bar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;
     padding:1rem 1.5rem;border-bottom:1px solid var(--line);background:var(--panel)}
code{background:var(--tint);padding:.1em .4em;border-radius:4px}

/* ---------------------------------------------------- dashboard chrome */
/* FOUR COLUMNS SINCE THE FLAGS ARRIVED, and that is what the fourth one is for. The bar had
   three and gained a child; grid put the overflow on a second row, which is how the address
   and Sign out ended up under the brand on the left instead of where they have always been. */
/* `position:relative` is kept with no absolutely positioned child left in the bar: a trial
   countdown used to be centred on the window from here, taken out of the grid so it sat in
   the middle of the SCREEN rather than the middle of whatever space the other items left
   over. The free plan is permanent since 2026-10-18 and the countdown is gone with it. */
.bar{display:grid;grid-template-columns:auto 1fr auto auto;gap:1rem;align-items:center;
     position:relative}
/*
 * The lockup in the bar, sized by HEIGHT alone. The SVG carries a viewBox and no intrinsic
 * size, so one number here fixes it and the width follows the artwork - which is what keeps
 * the mark round instead of squeezed when the bar wraps on a narrow screen.
 * `display:block` because an inline image sits on the text baseline and leaves a few pixels
 * of descender gap under it, which reads as the bar being off-centre.
 */
.brand{font-size:1.05rem;line-height:0}
/* 42px, not the 17px the words were. The lens stands well clear of the letters in this
   lockup, so only about a quarter of the artwork's height is the word "snap" - matching the
   old text's size means sizing the whole thing to roughly two and a half times it. */
.brand img{display:block;height:42px;width:auto}
.views{display:flex;gap:.4rem;justify-self:end}
.view{display:inline-block;padding:.4rem .9rem;border:1px solid var(--line);border-radius:999px;
      text-decoration:none;color:var(--fg);font-size:.9rem;background:var(--panel)}
.view:hover{background:var(--tint)}
.view.on{background:var(--fg);border-color:var(--fg);color:#fff}
.who{justify-self:end;white-space:nowrap}

/* minmax(0,1fr), not 1fr. A grid track's min-width is AUTO, which means min-content - so a
   child that refuses to be narrower than some width pushes the whole track wider and the
   page scrolls sideways. The bio editor is exactly that child: its frame is a fixed 65rem by
   design. With this, the column shrinks and the editor scales itself to fit instead. */
.layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:0;min-height:calc(100vh - 66px)}
.side{border-right:1px solid var(--line);padding:1rem .75rem;display:flex;flex-direction:column;gap:.15rem}
.nav{display:block;padding:.55rem .8rem;border-radius:8px;text-decoration:none;color:var(--fg);font-size:.94rem}
.nav:hover{background:var(--tint)}
.nav.on{background:var(--tint);font-weight:600}
.content{padding:1.75rem 2rem;max-width:56rem}
.h{font-size:1.45rem;margin:0 0 .3rem}
.spacer{margin-top:1.5rem}

@media (max-width:760px){
  .bar{grid-template-columns:1fr auto}
  /* The flags keep the address company on the second row rather than taking one of their
     own: four small buttons do not earn a line to themselves on a phone. */
  .langbar{grid-row:2;grid-column:2;justify-self:end}
  .who{grid-row:2;grid-column:1;justify-self:start}
  .layout{grid-template-columns:1fr}
  .side{flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid var(--line)}
  .content{padding:1.25rem}
}

/* ------------------------------------------------------- the profile page
   Two columns of two, so the whole of a photographer's public identity is on one screen.
   Stacked, the banner sat three scrolls under the name and was never seen without going
   looking for it - which is how it spent months with nothing linking to it at all.

   A grid of COLUMNS rather than a grid of cards: the four are not the same height, and four
   cards in a 2x2 grid would stretch the short ones to match the tall ones, leaving the name
   field floating in the middle of a box of air. Two columns that each stack their own cards
   let every box be exactly as tall as what is in it. */
.pfgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 1.25rem;
  align-items:start;max-width:86rem}
.pfcol{min-width:0}
/* They fill their column now, so the single-column cap would only make a gap on the right. */
.pfgrid .card{max-width:none}
@media (max-width:1100px){ .pfgrid{grid-template-columns:1fr} }

/* The wallpaper choices, drawn rather than described: a swatch of the background with a
   card on it, which is what the page actually is. A list of three names could not tell
   anybody which one is dark. */
/* 9rem, so all three fit on one row inside a half-width column. At 11rem they wrapped to
   two rows and the card grew a swatch taller than it needed to be, on the one page whose
   whole point is now that it does not scroll. */
.themes{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:.7rem;
  margin:.4rem 0 .2rem}
.theme{display:flex;flex-direction:column;gap:.3rem;cursor:pointer;border:1px solid var(--line);
  border-radius:12px;padding:.7rem;background:var(--panel)}
.theme:hover{border-color:var(--accent)}
.theme.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--tint)}
.theme input{position:absolute;opacity:0;width:0;height:0}
.theme:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.theme-art{display:block;height:3.6rem;border-radius:9px;border:1px solid var(--line);
  overflow:hidden;position:relative}
.theme-card{position:absolute;left:14%;right:14%;top:26%;bottom:16%;border-radius:6px;
  background:#fff;border:1px solid rgba(0,0,0,.12)}
.theme-n{font-weight:600;font-size:.94rem}
.theme-plain .theme-art{background:#fff}
.theme-linen .theme-art{background:#f6f2ea;
  background-image:radial-gradient(circle at 15% 0,#fdfbf6 0,rgba(253,251,246,0) 55%),
                   radial-gradient(circle at 100% 100%,#efe7d9 0,rgba(239,231,217,0) 60%)}
.theme-ink .theme-art{background:#15161a;
  background-image:radial-gradient(circle at 20% -10%,#23252c 0,rgba(35,37,44,0) 55%),
                   radial-gradient(circle at 110% 110%,#0c0d10 0,rgba(12,13,16,0) 60%)}

/* ------------------------------------------------------------------- the bio editor
   The frame is 42rem, which is `.pbiocol`'s max-width on the public page: the block is the
   same width here as it is there, so a line that fits does fit. Everything inside it is drawn
   by the SAME rules (.bl, .bl-s2, .bl-center...) that style the visitor's copy. */
/* THE SAME GEOMETRY AS THE PUBLIC PAGE, not merely a similar width.
   .pwrap is 68rem with 1.5rem of padding each side, so the content box is 65rem; .pintro is
   a flex row of the 5.5rem avatar, a 1.1rem gap and the bio filling the rest. This frame is
   that row, at that width, with a placeholder where the avatar is - so the bio wraps here on
   exactly the word it wraps on there, and ends where the banner and the third gallery cover
   end. The padding is added OUTSIDE the 65rem so the box is the frame plus its own border. */
.bioedit{border:1px solid var(--line);border-radius:10px;background:var(--panel);
  padding:.7rem .8rem;max-width:calc(65rem + 1.6rem + 2px)}
/* The window onto the frame. It is as wide as there is room for and as tall as the scaled
   frame, which the editor sets - a transform does not affect layout, so without this the box
   would keep the full unscaled height and leave a gap under the text. */
.bioedit-fit{overflow:hidden}
/* WIDTH, not max-width: the frame is the public page's content box at all times and the
   scale is what makes it fit a narrower window. Laid out at 65rem, it wraps where the real
   page wraps. */
.bioedit-frame{display:flex;align-items:flex-start;gap:1.1rem;width:65rem;min-height:3rem;
  transform-origin:top left}
/* Reserved whether or not a picture has been uploaded, because the bio's width depends on
   it: typing against a full-width frame and then uploading a picture would reflow every
   line. The circle is drawn only when there is one. */
.bioedit-av{flex:0 0 auto;width:5.5rem;height:5.5rem;border-radius:999px}
.bioedit-av.has{border:1px dashed var(--line);background:var(--tint)}
.bioedit-lines{flex:1;min-width:0}
/* Every line is a textarea wearing the paragraph's own classes, so it has to shed every
   default a browser gives one: the border, the padding, the background, the resize grip, the
   scrollbar - and the FONT, which Safari does not inherit into a form control at all.
   Shedding all of it is what makes the box the same shape with a caret in it.

   overflow:hidden with the height set from scrollHeight is what makes it grow rather than
   scroll; a textarea that scrolled would hide the end of a long line behind a caret. */
.blinput{display:block;width:100%;box-sizing:border-box;border:0;padding:0;margin:0;
  background:transparent;resize:none;overflow:hidden;
  font:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;font-style:inherit;
  font-family:inherit;color:inherit;text-align:inherit;letter-spacing:inherit}
.blinput:focus{outline:none;background:rgba(26,115,232,.05);border-radius:4px}
/* The minimum heights come from .bl-s1/2/3 and must not fight the measured height, so they
   are the floor only - a line taller than its size because it wrapped keeps that height. */
.blinput.bl-s1,.blinput.bl-s2,.blinput.bl-s3{height:auto}

/* The controls for the line that is open. Wrapped rather than scrolled: on a narrow column
   a scrolling toolbar hides the buttons nobody knew were there. */
.blbar{display:flex;flex-wrap:wrap;gap:.3rem;margin:0 0 .6rem;padding:0 0 .6rem;
  border-bottom:1px solid var(--line)}
.blb-g{display:inline-flex;align-items:center;gap:.15rem;padding-right:.4rem;
  border-right:1px solid var(--line)}
.blb-g:last-child{border-right:0;padding-right:0}
.blb{min-width:1.9rem;height:1.9rem;padding:0 .4rem;font:inherit;font-size:.82rem;
  border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--fg);
  cursor:pointer;line-height:1}
.blb:hover{background:var(--tint)}
.blb.on{background:var(--fg);border-color:var(--fg);color:#fff}
.blb-size{min-width:1.4rem;text-align:center;font-size:.8rem;color:var(--mut)}
.blb-font{height:1.9rem;padding:0 1.5rem 0 .4rem;font-size:.82rem;background-position:right .4rem center}
.blb-col{width:1.9rem;height:1.9rem;padding:0;border:1px solid var(--line);border-radius:7px;
  background:var(--panel);cursor:pointer}
/* Over a limit, the counter says so in the colour everything else in this product uses for
   a refusal - the server will refuse it, and the two should not look like different events. */
#bio-left.over{color:var(--err);font-weight:600}
.bio-say{color:var(--err);min-height:1.2em;margin:.2rem 0 0}
.bio-say:empty{min-height:0}
.avrow{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.avatar-prev{width:5.5rem;height:5.5rem;border-radius:999px;object-fit:cover;flex:0 0 auto;
  border:1px solid var(--line);background:var(--tint)}
.avatar-none{display:block;background:var(--tint) linear-gradient(135deg,transparent 46%,var(--line) 46%,var(--line) 54%,transparent 54%)}

/* OUR FILE PICKER, not the browser's. The real input is inside the label and hidden the way
   screen-reader text is - off-screen rather than display:none, so it keeps its place in the
   tab order and still focuses. The button is a span: a <button> inside a label would be
   pressed instead of opening the picker. */
.filepick{display:inline-flex;align-items:center;gap:.6rem;flex-wrap:wrap;cursor:pointer}
.filepick input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);
  clip-path:inset(50%);white-space:nowrap}
.filepick input:focus-visible+.btn{outline:2px solid var(--accent);outline-offset:2px}
.filepick-name{min-width:0;overflow-wrap:anywhere}
.filepick-name.chosen{color:var(--fg)}



/* ---------------------------------------------- the bio, drawn the same in both places
   These rules are in app.css rather than public.css ON PURPOSE: the public page loads both
   stylesheets and the dashboard loads this one, so this is the only file where a rule reaches
   the editor AND the visitor. Styling the bio anywhere else would be the start of the two
   drifting, which is the whole thing the shared renderer exists to prevent.

   SIZE IS COUNTED IN ROWS. One row is 1.55rem - the line box of ordinary bio text - and a
   line at size N is N rows tall, with the font scaled to fill it. That is what makes "ten
   rows high" a promise about the finished block rather than a guess about font sizes. */
.bl{--row:1.55rem;margin:0;line-height:var(--row);color:var(--mut);
    overflow-wrap:anywhere;font-size:.95rem}
.bl-s1{min-height:var(--row)}
/* 1.9x and 2.8x, not 2x and 3x: a capital at exactly two row-heights overflows its own line
   box once descenders are counted, and the block then measures taller than the ten rows it
   was promised. */
.bl-s2{min-height:calc(var(--row) * 2);line-height:calc(var(--row) * 2);font-size:1.9rem}
.bl-s3{min-height:calc(var(--row) * 3);line-height:calc(var(--row) * 3);font-size:2.8rem}
.bl-left{text-align:left}
.bl-center{text-align:center}
.bl-right{text-align:right}
.bl-b{font-weight:700}
.bl-i{font-style:italic}
/* The stylesheet owns what each font id looks like, so the list can be restyled without
   touching a stored value - the same arrangement as the three page themes. */
.bl-f-sans{font-family:system-ui,-apple-system,Segoe UI,sans-serif}
.bl-f-serif{font-family:Georgia,"Times New Roman",serif}
.bl-f-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.88em}
.bl-f-script{font-family:"Segoe Script","Bradley Hand",Chalkboard,cursive}

/* --------------------------------------------------------- widgets */
.widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(15rem,1fr));gap:1rem;margin:1.5rem 0}
.widget{display:flex;flex-direction:column;gap:.35rem;align-items:flex-start;text-align:left;
        background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:1.25rem;
        font:inherit;color:var(--fg);cursor:pointer}
.widget:hover{border-color:var(--accent);background:var(--tint)}
.wicon{font-size:1.5rem;line-height:1}
.wtitle{font-weight:600}

/* --------------------------------------------------------- dialogs */
.dlg{position:fixed;inset:0;background:rgba(32,33,36,.5);display:flex;align-items:flex-start;
     justify-content:center;padding:2rem 1rem;overflow:auto;z-index:50}
.dlg[hidden]{display:none}
.dlg-box{background:var(--panel);border-radius:14px;width:100%;max-width:34rem;
         box-shadow:0 12px 40px rgba(0,0,0,.22)}
.dlg-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;
          padding:1.1rem 1.35rem;border-bottom:1px solid var(--line)}
.dlg-head h2{margin:0}
.x{border:0;background:transparent;font-size:1.5rem;line-height:1;cursor:pointer;color:var(--mut)}
.dlg-body{padding:1.35rem;display:flex;flex-direction:column;gap:1.15rem}
.dlg-foot{display:flex;justify-content:flex-end;gap:.6rem;padding:1.1rem 1.35rem;
          border-top:1px solid var(--line)}

.f{display:flex;flex-direction:column;gap:.3rem;border:0;padding:0;margin:0}
.flabel{font-weight:600;font-size:.94rem}
.f input[type=text],.f input:not([type]){border:1px solid var(--line);border-radius:9px;
  padding:.6rem .7rem;font:inherit;background:var(--panel);color:var(--fg);width:100%}
.f select{width:100%}
.f input:disabled{background:var(--tint);color:var(--mut)}
.f input:focus,.f select:focus{outline:2px solid var(--accent);outline-offset:-2px}
.chk{display:flex;align-items:flex-start;gap:.5rem;font-size:.9rem;margin-top:.3rem;cursor:pointer}
.chk input{margin-top:.25rem}
.sub{margin:.5rem 0 0 1.5rem;padding-left:.85rem;border-left:2px solid var(--line)}
.sub[hidden]{display:none}
.pin{max-width:7rem;letter-spacing:.3em;text-align:center}
.addr .prefix{display:flex;align-items:center;padding:0 .2rem 0 .8rem;background:var(--tint);
              color:var(--mut);white-space:nowrap;font-size:.9rem}
.addr.muted{background:var(--tint)}
.gen{display:flex;align-items:center;padding:.7rem .8rem;color:var(--mut);letter-spacing:.2em}

/* ------------------------------------------------- access / sharing */
.acc-row{display:grid;grid-template-columns:7rem 1fr auto;gap:.6rem;align-items:center;margin:.5rem 0}
.acc-k{font-size:.86rem;color:var(--mut)}
.acc-v{overflow-wrap:anywhere;font-size:.9rem}
.acc-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:1rem}
.btn.small{padding:.35rem .75rem;font-size:.85rem}

/* ----------------------------------------------------------- table */
.tbl{width:100%;border-collapse:collapse;margin-top:1rem}
.tbl th{text-align:left;font-size:.8rem;color:var(--mut);font-weight:600;
        border-bottom:1px solid var(--line);padding:.5rem .6rem}
.tbl td{border-bottom:1px solid var(--line);padding:.7rem .6rem;vertical-align:top}
/* Inside a table cell the label should not carry the block spacing it has in a form. */
.chk.tight{margin:0;white-space:nowrap}
.tag{display:inline-block;padding:.15rem .6rem;border-radius:999px;font-size:.78rem}
.tag.pub{background:#e6f4ea;color:var(--ok)}
/* A third kind needs a third colour: for sale is neither open nor shut, and reusing either
   of the two would make the column read as having two values with one mislabelled. */
.tag.sale{background:#fff2d8;color:#8a5a00}
/* The one link on the PayPal card that leaves the product. Given its own line because it
   answers a different question from the three beside it: those explain how selling works,
   this one is for somebody who has nothing to paste in yet. */
.ppman{margin-top:.35rem}
.tag.priv{background:var(--tint);color:var(--mut)}

/* -------------------------------------------- account / social / assets */
.wide-input{width:100%;border:1px solid var(--line);border-radius:9px;padding:.6rem .7rem;
            font:inherit;background:var(--panel);color:var(--fg)}
.h3{font-size:.98rem;margin:1.4rem 0 .4rem}
.hist{list-style:none;padding:0;margin:.5rem 0 0;display:flex;flex-direction:column;gap:.45rem}
.hist li{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;font-size:.92rem;
         padding:.4rem 0;border-bottom:1px solid var(--line)}
.inline{display:inline}
/* A single photograph carries its link underneath, because the link is the whole product
   here - a tile you cannot copy an address from would be a gallery tile with no gallery. */
.pgrid.singles{grid-template-columns:repeat(auto-fill,minmax(17rem,1fr))}
.ptile.single{display:flex;flex-direction:column;background:var(--panel);
  border:1px solid var(--line);border-radius:12px;overflow:hidden;aspect-ratio:auto}
.ptile.single img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.slink{display:flex;flex-direction:column;gap:.45rem;padding:.6rem}
.slink-url{width:100%;font:inherit;font-size:.78rem;padding:.35rem .45rem;border-radius:8px;
  border:1px solid var(--line);background:var(--panel);color:var(--mut)}
.slink-actions{display:flex;gap:.35rem;flex-wrap:wrap}
/* The three switches on a shared file, on one line until the tile is too narrow for it.
   They are settings about the same picture and belong together; the price below them is a
   different kind of decision and gets its own row. */
.sopts{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .7rem}
/* Selling the whole gallery, on the bar that fills it. Wraps to its own line on a narrow
   screen rather than squeezing the Add files button. */
.gsell{display:inline-flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.gsell form{display:inline-flex;align-items:center;gap:.35rem;margin:0}
.gsell .sellp input{width:4.4rem}
.wmkind{font:inherit;font-size:.75rem;padding:.2rem .3rem;border-radius:6px;
  border:1px solid var(--line);background:var(--panel);color:var(--fg);max-width:100%}
.sprice,.sunsell{display:flex;align-items:center;gap:.4rem;margin:0}
.sprice .sellp input{width:3.6rem}
/* A state, not a control - same treatment as the gallery panel's, for the same reason. */
.onsale{flex:1;font-size:.78rem;color:var(--ok,#2f7d4f);font-weight:600}
.vidmark{display:grid;place-items:center;width:100%;height:100%;min-height:6rem;
  background:#1f2a36;color:#cbd5e1;font-size:.7rem;letter-spacing:.08em}
.card.danger{border-color:#f3c0bc}
.danger-btn{background:var(--err);border-color:var(--err);color:#fff}
.danger-btn:hover{background:#8f1e17}
/* The field has to show a real handle, so the prefix is short and the input is sized in ch
   to fit 20 characters at any font size.

   FLEX, not grid, and this matters: a grid with fixed minimum columns cannot shrink below
   their sum. The previous version needed ~39.7rem inside a 30.5rem card, so every row burst
   out of its container and the nowrap checkbox label was drawn across the row's bottom
   border. Flex-wrap drops the checkbox onto its own line instead of overflowing, and
   min-width:0 lets the address block actually shrink - flex items default to min-width:auto
   and would otherwise refuse to go below their content width. */
.sl{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem .75rem;
    padding:.75rem 0;border-bottom:1px solid var(--line)}
.sl:last-child{border-bottom:0}
.sl-ico{flex:0 0 1.5rem;display:flex;align-items:center;justify-content:center}
.sl-ico svg{width:22px;height:22px}
.sl-net{flex:0 0 5.5rem;font-weight:600;font-size:.92rem}
.sl-addr{flex:1 1 17rem;min-width:0;margin:0}
.sl-addr .prefix{font-size:.84rem;padding:0 .15rem 0 .6rem}
.sl-addr input{min-width:20ch;width:100%}
.sl-show{flex:0 0 auto;margin:0}
.phone{display:flex;gap:.5rem}
.phone select{flex:0 0 14rem}
.pnum{flex:1;border:1px solid var(--line);border-radius:9px;padding:.6rem .7rem;font:inherit;
      background:var(--panel);color:var(--fg)}
/* A banner is 2000x600, so at full width it is a third of the card's height again. Capped:
   this is a check that the right image is there, not the place it is looked at. */
.preview{max-width:100%;max-height:9rem;object-fit:cover;border-radius:10px;
  border:1px solid var(--line)}
/* The banner, beside its own upload and its own Remove, the way the profile picture is. A
   fixed wide strip rather than the image's own shape: it is the shape the public page gives
   it, and it leaves room on the row for the two controls. */
.avrow .preview{flex:0 0 auto;width:16rem;height:4.2rem}
.faq{border-bottom:1px solid var(--line);padding:.85rem 0}
.faq summary{cursor:pointer;font-weight:600}
.faq p{margin:.6rem 0 0;color:var(--mut);font-size:.93rem}
/* The steps. Numbered because they are in an order, and indented enough that the numbers
   line up under the answer rather than under the question. */
.faqsteps{margin:.6rem 0 .2rem;padding-left:1.35rem;color:var(--mut);font-size:.93rem}
.faqsteps li{margin:.3rem 0;line-height:1.45}
/* A group heading, not a card: these separate a long list, they do not box it. */
.faqgroup{font-size:1.02rem;font-weight:600;margin:1.9rem 0 .2rem;
          padding-bottom:.35rem;border-bottom:2px solid var(--line)}
.faqgroup:first-of-type{margin-top:1.1rem}
@media (max-width:860px){
  .sl-net{flex:0 0 auto}
  .phone{flex-direction:column}
  .phone select{flex:1}
}

/* ------------------------------------------------- statistics / upload */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:.85rem;margin:1.2rem 0}
.stat{border:1px solid var(--line);border-radius:12px;padding:1rem;background:var(--panel);
      display:flex;flex-direction:column;gap:.15rem}
.stat-v{font-size:1.6rem;font-weight:600;line-height:1.15}
.stat-l{font-size:.86rem;color:var(--mut)}
/* The one tile that leads somewhere. Pushed to the bottom of its box so a row of tiles of
   different heights still has its buttons on one line. */
.stat-more{margin-top:auto;align-self:flex-start;padding-top:.5rem}
.stat-more.btn{margin-top:.6rem}

/* A sale in the Activity list carries its amount. Green, like every other number on this
   platform that is money arriving. */
.hist-amt{font-weight:700;color:var(--ok)}

/* ------------------------------------------------- the sales ledger
   A receipt book: five columns, the money ones right-aligned so they read as a column of
   figures rather than as five sentences. */
.erntbl td,.erntbl th{vertical-align:top}
.ernname{display:block;font-weight:600}
.ernwhere{display:block;color:var(--mut)}
.ernnet{font-weight:700;color:var(--ok)}
/* An estimate is not the same kind of number as a figure PayPal reported, and the page says
   why underneath. Here it only stops being read as exact. */
.ernnet.est{color:var(--mut);font-weight:600}
.erntbl tfoot td{border-top:2px solid var(--line);font-weight:600}
.tbl .num{text-align:right}
.tbl th.num{text-align:right}
/* Last resort on a narrow screen: the table scrolls inside its own card rather than
   spilling over the border or forcing the whole page sideways. */
/* Kept as a last resort for a genuinely narrow screen - a phone - rather than as the normal
   state. On anything desktop-sized the table should fit, which is what the full-width page
   and the shrinkable filter row are for. Removing it outright would make the PAGE scroll
   sideways instead, which is worse. */
.tblwrap{overflow-x:auto}
/* A gallery address is one long unbroken string and would otherwise set the minimum width of
   the whole table on its own - which is exactly how the galleries list grew past the page and
   started scrolling sideways. */
.tbl .brk{overflow-wrap:anywhere}
/* The cover thumbnail is the other fixed demand in that table; a little smaller buys back the
   width the two extra columns cost, without the picture stopping being recognisable. */
.covcell{width:5rem}
.cov{width:4.5rem}

.drop{border:2px dashed var(--line);border-radius:14px;padding:1.75rem 1.25rem;text-align:center;
      background:var(--panel);cursor:pointer;transition:border-color .12s,background .12s}
.drop:hover,.drop:focus-visible{border-color:var(--accent);background:var(--tint);outline:none}
.drop.over{border-color:var(--accent);background:#e8f0fe}
.drop-main{font-weight:600;margin:0 0 .3rem}
.drop p{margin:.25rem 0}

.uplist{list-style:none;padding:0;margin:1rem 0 0;display:flex;flex-direction:column;gap:.5rem}
.up{display:grid;grid-template-columns:1fr 9rem 8rem 1.6rem;gap:.75rem;align-items:center;font-size:.88rem}
.up-n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.up-bar{background:var(--tint);border-radius:999px;height:.5rem;overflow:hidden}
.up-bar i{display:block;height:100%;width:0;background:var(--accent);transition:width .15s}
.up-s{color:var(--mut);text-align:right}
.up.bad .up-s{color:var(--err)}
.up-x{border:0;background:transparent;color:var(--err);font-size:1.25rem;line-height:1;
      cursor:pointer;padding:0 .2rem;border-radius:5px}
.up-x:hover,.up-x:focus-visible{background:#fce8e6;outline:none}
.up-x[hidden]{display:none}
.ptile-x{border:0;background:transparent;color:var(--err);font-size:1.1rem;line-height:1;
         cursor:pointer;margin-left:.35rem;padding:0 .2rem}
.ptile-wait{display:flex;align-items:center}

.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(9rem,1fr));gap:.6rem;margin-top:1.1rem}

/* ---------------------------------------------------------------- For sale
   Wider cells than the gallery grid, because every one of these carries a price, a sale
   count and a button under the picture - and three controls squeezed into a 9rem column
   wrap into three lines and stop reading as one photo's row. */
.pgrid.forsale{grid-template-columns:repeat(auto-fill,minmax(13rem,1fr));gap:.9rem}
.ptile.fstile{display:flex;flex-direction:column;background:var(--panel);
  border:1px solid var(--line);border-radius:12px;overflow:hidden;aspect-ratio:auto;padding:0}
.ptile.fstile img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;max-height:none}
.fscap{display:flex;flex-direction:column;gap:.35rem;padding:.5rem .6rem .6rem}
/* One line, clipped. A filename is often forty characters of camera serial number and the
   gallery name is the part worth reading. */
.fsname{font-size:.8rem;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fsrow{display:flex;align-items:center;gap:.4rem}
/* The price is the control, so it has to look pressable - a bare number would be read as a
   label and the panel behind it would never be found. */
.fsprice{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;background:var(--tint);
  color:var(--fg);font:inherit;font-size:.86rem;font-weight:700;padding:.18rem .6rem;cursor:pointer}
.fsprice:hover,.fsprice:focus-visible{border-color:var(--accent);color:var(--accent);outline:none}
.fssold{flex:1 1 auto;font-size:.76rem;color:var(--mut);white-space:nowrap}
/* Grey at nought, green once something has actually sold: a shelf of "0 sold" should not
   look like a row of achievements, and the first sale should be visible from across a grid. */
.fssold.has{color:#2f8a4c;font-weight:700}
.fsdrop{flex:0 0 auto;width:1.6rem;height:1.6rem;display:inline-flex;align-items:center;
  justify-content:center;border:1px solid var(--line);border-radius:999px;background:var(--panel);
  color:var(--mut);font-size:1.1rem;line-height:1;cursor:pointer;padding:0}
.fsdrop:hover,.fsdrop:focus-visible{border-color:var(--err);color:var(--err);outline:none}

/* Whole galleries on the For sale page: a list, not a grid.
   A gallery has no single picture to stand for it - it has a name and a count - so a tile
   would be a thumbnail of whichever photo happened to be first, which is a lie about what
   is being sold. */
.fswholes{list-style:none;margin:.5rem 0 1.6rem;padding:0;display:flex;flex-direction:column;
  gap:.4rem}
.fswhole{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;background:var(--panel);
  border:1px solid var(--line);border-radius:10px;padding:.5rem .7rem}
.fswname{font-weight:700;font-size:.92rem;color:var(--fg);text-decoration:none}
.fswname:hover{color:var(--accent)}
.fswn{flex:1 1 auto;white-space:nowrap}
.fswprice{display:inline-flex;align-items:center;gap:.35rem}
.fswhole .fsrow{flex:0 0 auto;gap:.5rem}
.fswhole .fssold{flex:0 0 auto}

/* Galleries sold: who has what, and how much of their download allowance is left.
   A list rather than a grid for the reason the listings above are - there is no picture to
   show, and the useful thing is a name beside a number. */
.fssales{list-style:none;margin:.5rem 0 1.6rem;padding:0;display:flex;flex-direction:column;
  gap:.35rem}
.fssale{display:flex;align-items:baseline;gap:.5rem .9rem;flex-wrap:wrap;
  background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:.45rem .7rem}
.fssname{font-weight:700;font-size:.88rem}
.fssbuyer{flex:1 1 12rem;min-width:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.fssdate,.fssprice{white-space:nowrap}
/* Grey while there is room left, and marked only once both are gone - that is the single
   state the photographer may have to act on, so it is the only one that shouts. */
.fssdl{white-space:nowrap}
.fssdl.spent{color:var(--err);font-weight:700}

/* ---------------------------------------------------------------- FAQ search */
.faqsearch{margin:1rem 0 .4rem;max-width:34rem}
.faqsearch input{width:100%}
.faqhits{margin-top:.6rem}
/* Each result is one target: the group it is under, the question, and the words around the
   match. Block, not inline, so the whole card is pressable on a phone. */
.faqhit{display:block;padding:.55rem .7rem;margin-bottom:.45rem;border:1px solid var(--line);
  border-radius:10px;background:var(--panel);text-decoration:none;color:inherit}
.faqhit:hover,.faqhit:focus-visible{border-color:var(--accent);outline:none}
.faqhit-g{display:block;font-size:.72rem;color:var(--mut);text-transform:uppercase;letter-spacing:.04em}
.faqhit-q{display:block;font-weight:600;margin:.1rem 0 .2rem}
.faqhit-w{display:block;font-size:.84rem;color:var(--mut);line-height:1.5}
.faqhit mark{background:#fff3c4;color:inherit;padding:0 .1em;border-radius:3px}

.fsfilters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:.7rem;margin-top:1rem}
.fsf{display:flex;flex-direction:column;gap:.2rem}
.fsf select{font-size:.85rem;padding:.4rem 1.9rem .4rem .6rem}
.fstally{margin-top:.6rem}
.ptile{margin:0;aspect-ratio:4/3;border-radius:9px;overflow:hidden;background:var(--tint);
       display:flex;align-items:center;justify-content:center;padding:.25rem}
.ptile img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}
.ptile-wait{font-size:.78rem;color:var(--mut)}
@media (max-width:620px){ .up{grid-template-columns:1fr 5rem 1.6rem} .up-bar{display:none} }

/* Social marks on the public page. */
.psocial{display:flex;gap:.9rem;flex-wrap:wrap;align-items:center;margin:.6rem 0 1.2rem}
.sicon{display:inline-flex;text-decoration:none;border-radius:8px;line-height:0;
       transition:transform .12s,opacity .12s}
.sicon:hover,.sicon:focus-visible{transform:translateY(-2px);opacity:.85;outline:none}
.sicon:focus-visible{box-shadow:0 0 0 3px var(--tint),0 0 0 5px var(--accent)}
.sicon svg{display:block;width:30px;height:30px}

/* ------------------------------------------------ gallery editor layout */
.content-wide{max-width:none;padding-right:1.5rem}

/* Photographs in the middle, the gallery's controls down the right.
   The rail is six widgets one line tall; each opens its own panel OVER the photographs
   rather than beside them, so the controls cost a strip of page until they are wanted. */
.gwrap{display:grid;grid-template-columns:minmax(0,1fr) 17rem;gap:1.5rem;align-items:start}
.gmain{min-width:0}
/* One line: back, the name, what is wrong with it if anything, and the tab strip. It wraps
   rather than scrolls, because a gallery with nine parts should get a second row of tabs,
   not a row you have to drag sideways to read. */
.ghead{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem .8rem;margin:0 0 1rem}
.gtitle{font-size:1.25rem;margin:0;overflow-wrap:anywhere}
.gstate{margin:0 0 0 auto}
.gtabs{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem}
.gtab{display:inline-flex;align-items:center;gap:.45rem;padding:.42rem .8rem;
  border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--fg);
  text-decoration:none;font-size:.9rem;line-height:1.2;cursor:pointer;font-family:inherit}
.gtab:hover{background:var(--tint);border-color:var(--accent)}
.gtab .fine{margin:0}
.gtab.on{border-color:var(--sc,var(--accent));background:var(--tint);font-weight:600}
.gtab.over{border-color:var(--accent);background:#e8f0fe;box-shadow:0 0 0 2px var(--accent) inset}
.gtab .dot{width:.6rem;height:.6rem;border-radius:999px;flex:0 0 auto;background:var(--sc)}
/* Square-ish and iconic, so the three controls read as controls rather than as three more
   parts of the gallery with very short names. */
.gtab-add,.gtab-del,.gtab-edit{padding:.42rem .62rem;font-size:1rem;color:var(--mut)}
.gtab-add,.gtab-del{font-weight:600}
.gtab-add:hover,.gtab-del:hover,.gtab-edit:hover{color:var(--fg)}
.gtab-del:hover:not(:disabled){color:var(--err);border-color:var(--err)}
/* Off, not gone: a control that disappears when it has nothing to do moves everything
   beside it, and + would shift sideways the moment the first part was made. */
.gtab:disabled{opacity:.45;cursor:default;background:var(--panel)}
.gtab:disabled:hover{border-color:var(--line);background:var(--panel);color:var(--mut)}

/* Which part to remove: one row each, the colour dot it carries on the strip, and how much
   is in it - which is the number the next question is about. */
.pickers{display:flex;flex-direction:column;gap:.4rem}
.pick{display:flex;align-items:center;gap:.55rem;width:100%;text-align:left;font:inherit;
  color:var(--fg);background:var(--panel);border:1px solid var(--line);border-radius:10px;
  padding:.55rem .7rem;cursor:pointer}
.pick:hover{border-color:var(--err);background:var(--tint)}
.pick:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.pick .dot{width:.6rem;height:.6rem;border-radius:999px;flex:0 0 auto;background:var(--sc)}
.pick-n{font-weight:600}
.pick .fine{margin:0 0 0 auto}
.gform{display:flex;flex-direction:column;gap:1rem;margin-top:.25rem}
.gform .f input[type=text],.gform .f input:not([type]),.gform .f select{width:100%}

.grail{position:sticky;top:1rem;display:flex;flex-direction:column;gap:.45rem}
/* list-style on the summary itself, because Safari uses ::-webkit-details-marker and the
   others use ::marker; setting both is the only way to lose the triangle everywhere. */
.gw-sum{list-style:none;cursor:pointer;display:flex;align-items:center;gap:.6rem;
  background:var(--panel);border:1px solid var(--line);border-radius:12px;
  padding:.6rem .7rem}
.gw-sum::-webkit-details-marker{display:none}
.gw-sum::marker{content:''}
.gw-sum:hover{border-color:var(--accent);background:var(--tint)}
.gw-sum:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.gw-ico{font-size:1.1rem;line-height:1;flex:0 0 auto}
.gw-txt{display:flex;flex-direction:column;min-width:0;gap:.1rem}
.gw-txt b{font-size:.92rem;line-height:1.2}
.gw-txt .fine{line-height:1.2;overflow-wrap:anywhere}
.gw-caret{margin-left:auto;color:var(--mut);transition:transform .12s}
.gw[open] .gw-sum{border-color:var(--accent);background:var(--tint)}
.gw[open] .gw-caret{transform:rotate(90deg)}
.gw-danger .gw-sum{border-color:#f3c0bc}
.gw-danger[open] .gw-sum{border-color:var(--err);background:#fdeeec}

/* The panel flies out beside the rail, top-aligned with it rather than with the widget it
   came from. Anchored to the widget, a panel opened from the bottom of the rail starts 400px
   down and has nowhere left to go; anchored to the rail, every one of them gets the same
   height whichever was pressed, and the highlighted widget says which that was. Wider than
   the rail on purpose - a settings form squeezed into 17rem is a settings form nobody reads.
   It overlays the photographs, which are still there when it shuts. */
.gw-pop{position:absolute;z-index:30;top:0;right:calc(100% + .6rem);width:30rem;
  max-width:calc(100vw - 22rem);max-height:calc(100vh - 8rem);overflow-y:auto;
  background:var(--panel);border:1px solid var(--line);border-radius:14px;
  box-shadow:0 12px 40px rgba(0,0,0,.18);padding:1.1rem 1.2rem;
  display:flex;flex-direction:column;gap:.9rem}
.gw-pop>*{margin-top:0;margin-bottom:0}
.gw-pop .f input[type=text],.gw-pop .f input:not([type]),.gw-pop .f select{width:100%}
.gw-pop .hist{margin:0}
.gslug{border-top:1px solid var(--line);padding-top:.8rem}
/* The form is the top of the panel now - the destination question first, because it is the
   one that changes what the link means - so it carries a rule UNDER it instead of over. */
.contribform{display:flex;flex-direction:column;gap:.9rem;padding-bottom:.9rem;
  border-bottom:1px solid var(--line)}
.contribform .sub{display:flex;flex-direction:column;gap:.25rem}
.contribform .sub input{width:100%}

/* The finished link: wide, monospaced and selectable, because it is read to check it and
   copied to use it, and a proportional font makes a token of random characters a puzzle. */
.linkbox{width:100%;font:inherit;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.85rem;padding:.6rem .7rem;border:1px solid var(--line);border-radius:9px;
  background:var(--tint);color:var(--fg)}
.linkbox:focus{outline:2px solid var(--accent);outline-offset:-2px}

/* The whole middle is the drop target: the strip of controls, the photographs, and the
   space around them. No dashed box, because the box was a permanent advertisement for an
   action taken a few times a week and the grid - the one part of the page that obviously
   means "photographs go here" - was the part that ignored a drop. */
/* A column so the photo panel can FILL it: the area that accepts a drop and the area that
   looks like it accepts a drop have to be the same area, or the honest half of the page is
   the invisible one. */
.dropfield{display:flex;flex-direction:column;height:calc(100vh - 13rem);min-height:24rem;
  border:2px dashed transparent;border-radius:14px;margin:-.5rem;padding:.5rem;
  transition:background .12s,border-color .12s}
.dropfield.over{border-color:var(--accent);background:#e8f0fe}
.dropfield.over .pscroll{background:transparent;border-color:var(--accent)}

/* Button on its own line, everything else on one line under it. The limits are read once,
   when something is refused, and do not deserve four rows at the top of every visit. */
.upbar{display:flex;flex-direction:column;gap:.3rem;margin:0 0 .9rem}
/* The button and the order sit on one row with the whole width between them: adding files
   is what you came for and belongs at the start, changing the order is what you do while
   looking at what is already there. */
.upbtn{margin:0;display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}
.gsort{margin-left:auto;display:flex;align-items:center;gap:.4rem}
.gsort-l{display:flex;align-items:center;gap:.35rem}
.gsort select{font:inherit;padding:.25rem .4rem;border:1px solid var(--line);
  border-radius:8px;background:var(--panel);color:inherit;max-width:12rem}
.upnote{margin:0}
.pscroll{margin-top:0;min-height:14rem;overflow-y:auto;
         border:1px solid var(--line);border-radius:12px;padding:.85rem;background:var(--panel)}
/* Fills whatever the drop field has left, so the bordered box IS the target - and keeps
   its own scrollbar, so four hundred photographs do not push the tab strip off the top.
   min-height:0 is what lets a flex item be SHORTER than its content and scroll. */
.dropfield .pscroll{flex:1 1 auto;min-height:0}
.pscroll .pgrid{margin-top:0;grid-template-columns:repeat(auto-fill,minmax(10rem,1fr))}

/* ------------------------------------------- how the batch is going, and what did not go
 *
 * Above the pictures, under the controls: a drop of a hundred and fifty needs one line
 * saying it is moving, and the list of what has not made it needs to be the first thing
 * read on the way back to this page - including the way back that is a reload.
 */
.uppanels{margin:0 0 .9rem;display:flex;flex-direction:column;gap:.6rem}
.uppanels:empty{display:none}
.upprog{margin:0;font-size:.82rem;color:var(--mut);font-variant-numeric:tabular-nums}
.upprog[hidden]{display:none}

/* Red-edged rather than red-filled: it is a list to work through, not an alarm, and it can
   be forty names long. */
.upfail{border:1px solid var(--err);border-radius:10px;background:#fdeeec;padding:.7rem .8rem}
.upfail[hidden]{display:none}
.upfail-h{margin:0 0 .4rem;font-weight:600;color:var(--err)}
/* Capped and scrolling. Thirty-seven names must not push the photographs off the screen -
   the gallery is still the thing on this page. */
.upfail-list{margin:0;padding:0;list-style:none;max-height:9rem;overflow-y:auto;
  font-size:.82rem}
.upfail-list li{display:flex;gap:.6rem;justify-content:space-between;padding:.12rem 0}
.upfail-n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upfail-w{flex:0 0 auto;color:var(--mut)}
/* The reason, said ONCE, when every row agrees on it. A batch that runs out of storage
   produces the same sentence against every remaining file, and printing it fourteen hundred
   times buries the only thing worth reading: which files they are. */
.upfail-why{margin:0 0 .4rem;color:var(--err)}
/* At most 200 names are laid out. The rest are still on the list, still in Copy the list,
   and still counted in the heading - this is the line that says so, because a list that
   quietly stops being complete is worse than no list. */
.upfail-more{margin:.35rem 0 0;color:var(--mut)}
.upfail-lost{margin:.35rem 0 0;font-weight:600;color:var(--err)}
.upfail-acts{margin:.55rem 0 0;display:flex;gap:.4rem;flex-wrap:wrap}

/* A tile holding a place. Same square as the photograph that will replace it, so a drop of
   forty looks like the gallery growing rather than like a list of forty rows above a grid
   that has not changed. */
.uping{cursor:default;display:flex;align-items:center;justify-content:center;
  background:var(--tint);border:1px solid var(--line);border-radius:10px;
  aspect-ratio:4/3;overflow:hidden}
.up-body{display:flex;flex-direction:column;gap:.4rem;align-items:center;width:100%;
  padding:.7rem;text-align:center;position:relative}
.uping .up-n{font-size:.78rem;color:var(--mut);max-width:100%;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.uping .up-bar{display:block;width:100%;height:5px;border-radius:999px;background:var(--line);
  overflow:hidden}
.uping .up-bar i{display:block;height:100%;width:0;background:var(--accent);
  transition:width .15s}
.uping .up-s{font-size:.78rem;color:var(--mut)}
.uping.bad{border-color:var(--err);background:#fdeeec}
.uping.bad .up-s{color:var(--err)}
.uping .up-x{position:absolute;top:-.3rem;right:-.2rem;border:0;background:transparent;
  color:var(--mut);cursor:pointer;font-size:1rem;line-height:1}
.uping .up-x:hover{color:var(--err)}
/* Hidden until something has actually failed, so a tile that is merely uploading is not
   offering to do it again. The File is still in this browser, so this is a real retry and
   not a re-pick - which is why it can be one press. */
.up-r{border:1px solid var(--err);background:#fff;color:var(--err);cursor:pointer;
  font:inherit;font-size:.74rem;line-height:1;padding:.25rem .5rem;border-radius:999px}
.up-r:hover,.up-r:focus-visible{background:var(--err);color:#fff;outline:none}
.up-r[hidden]{display:none}

.ptile{cursor:pointer;position:relative}
.ptile:hover img{opacity:.88}
.ptile.is-cover{outline:3px solid var(--accent);outline-offset:-3px}
/* Two photographs with the same filename AND the same size, in the same part. After
   .is-cover on purpose: a cover already says so in words on a badge, and "you have this one
   twice" is the thing that needs finding by eye across a grid of two hundred. */
.ptile.dup{outline:3px solid var(--err);outline-offset:-3px}
.ptile.dup::before{content:'';position:absolute;inset:0;border-radius:inherit;
  box-shadow:inset 0 0 0 3px var(--err);pointer-events:none}
.cover-flag{position:absolute;left:.4rem;top:.4rem;background:var(--accent);color:#fff;
            font-size:.68rem;padding:.12rem .45rem;border-radius:999px;letter-spacing:.02em}

/* ------------------------------------------------- the number on each photograph
 *
 * A CSS COUNTER, NOT A RENDERED NUMBER. The grid changes constantly - an upload lands, a
 * photograph is deleted from the viewer, a drag re-files one into another part - and a
 * number printed into the markup would be wrong from the first of those until a reload.
 * The counter is recomputed by the browser on every DOM change, so there is no renumbering
 * code to call and no way to forget to call it.
 *
 * ::after, because ::before on .ptile is already the duplicate mark's red inset.
 *
 * Bottom-left is the only free corner: the cover badge is top-left and the client's marks
 * stack down from top-right.
 */
.pgrid{counter-reset:pno}
.ptile{counter-increment:pno}
.ptile::after{content:counter(pno);position:absolute;left:.4rem;bottom:.4rem;
  background:rgba(16,16,16,.66);color:#fff;font-size:.68rem;line-height:1;
  padding:.18rem .4rem;border-radius:999px;font-variant-numeric:tabular-nums;
  pointer-events:none}
/* Not a photograph yet, so it takes no number AND consumes none - otherwise everything
   after a still-uploading tile would be numbered one too high until the worker finished. */
.ptile.uping{counter-increment:none}
.ptile.uping::after{content:none}
.ptile:has(.ptile-wait){counter-increment:none}
.ptile:has(.ptile-wait)::after{content:none}
/* The singles page has no gallery to be the twenty-third of. */
.pgrid.singles .ptile{counter-increment:none}
.pgrid.singles .ptile::after{content:none}

/* ------------------------------------------------- and when the grid has been re-ordered
 *
 * COUNTING SQUARES ONLY TELLS THE TRUTH IN THE GALLERY'S OWN ORDER. Sorted by file size,
 * the third square along is not the client's photograph number 3 - and the number is the
 * thing a client says out loud, so the owner is the one who would end up wrong. So the
 * counter is switched off and the real position, worked out before the sort in
 * photosort.js and carried on the tile, is printed instead. Identical badge either way:
 * the number means the same thing, and only where it comes from changes.
 *
 * A tile with no data-n - one still processing - renders content:"" and therefore no badge,
 * which is the same thing the counter rules do for it. */
.pgrid.resorted .ptile{counter-increment:none}
.pgrid.resorted .ptile::after{content:attr(data-n)}
.pgrid.resorted .ptile:not([data-n])::after{content:none}

/* ------------------------------------------- the owner's full-screen photo viewer */
/* BELOW .dlg (z-index 50) ON PURPOSE. The delete confirmation is an ordinary dialog and
   opens on top of this one; a question the viewer covered would be a question nobody can
   answer, with the page apparently frozen behind it. */
body.pv-open{overflow:hidden}
.pv{position:fixed;inset:0;z-index:40;background:rgba(10,10,10,.94);
    display:grid;grid-template-columns:3.25rem 1fr 3.25rem minmax(13rem,17rem);
    grid-template-rows:1fr;align-items:center;justify-items:center;gap:.75rem;padding:1rem}
.pv[hidden]{display:none}
/* contain, never cover: the whole photograph. The grid crops for tidiness; this is the
   view the work is judged on and nothing may be cut off it. */
.pv-shot{grid-column:2;grid-row:1;max-width:100%;max-height:calc(100vh - 2rem);
         width:auto;height:auto;object-fit:contain;border-radius:4px}
.pv-shot[hidden]{display:none}
.pv-nav{grid-row:1;background:transparent;border:0;color:#fff;font-size:2.6rem;line-height:1;
        cursor:pointer;opacity:.55;padding:.5rem}
.pv-nav:hover,.pv-nav:focus-visible{opacity:1;outline:none}
.pv-nav:disabled{opacity:.12;cursor:default}
.pv-prev{grid-column:1}
.pv-next{grid-column:3}
.pv-side{grid-column:4;grid-row:1;align-self:stretch;justify-self:stretch;overflow:auto;
         display:flex;flex-direction:column;gap:.9rem;
         background:var(--panel);border-radius:12px;padding:1.1rem}
.pv-top{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem}
/* A filename is one long unbroken word as often as not, and it must not push the panel
   wider than the column it was given. */
.pv-name{margin:0;font-size:1rem;line-height:1.3;overflow-wrap:anywhere}
.pv-meta{margin:0}
.pv-acts{display:flex;flex-direction:column;gap:.5rem}
.pv-acts .btn{width:100%}
.pv-note{margin:0;min-height:1.1rem}
/* Pushed to the bottom of the panel: it is the least important thing in it and should not
   sit between the two buttons and whatever the viewer has just been told. */
.pv-hint{margin:0;margin-top:auto;opacity:.6}

/* Narrow: the panel goes under the photograph, because four columns on a phone leaves the
   picture a strip. The arrows stay beside it rather than moving into the panel - stepping
   through is a thing done repeatedly and it should not move. */
@media (max-width:860px){
  .pv{grid-template-columns:2.5rem 1fr 2.5rem;grid-template-rows:1fr auto;padding:.5rem;gap:.5rem}
  .pv-shot{max-height:calc(100vh - 15rem)}
  .pv-side{grid-column:1/-1;grid-row:2;align-self:auto;justify-self:stretch}
  .pv-acts{flex-direction:row}
  .pv-hint{display:none}
}
.dlg-box.narrow{max-width:24rem}
.dlg-box.decide{max-width:38rem}
/* The destructive choice goes to the far end, away from the one somebody is reaching for. */
.dlg-foot .danger-btn{margin-right:auto}
/* A button label is a label, not a paragraph: let the ROW wrap before the words do. */
.dlg-foot{flex-wrap:wrap}
.dlg-foot .btn{white-space:nowrap}

/* Narrow: the rail goes under the photographs and its panels stop floating. A popup
   pinned to the right of a one-column page is a popup half off the screen. */
@media (max-width:1100px){
  .gwrap{grid-template-columns:1fr}
  .grail{position:static}
  .gw-pop{position:static;width:auto;max-width:none;max-height:none;box-shadow:none;
          margin-top:.35rem}
  /* margin-left:auto pushes the state to the end of the head row, which on one column
     strands it alone on the right. Let it sit where it falls. */
  .gstate{margin-left:0}
  .dropfield{height:auto;min-height:0}
  .pscroll{max-height:none;overflow:visible;border:0;padding:0;background:transparent}
}

/* ------------------------------------------------- gallery list covers */
.covcell{width:6.5rem}
.cov{display:block;width:5.5rem;aspect-ratio:4/3;border:1px solid var(--line);border-radius:8px;
     overflow:hidden;background:var(--tint);display:flex;align-items:center;justify-content:center;
     text-decoration:none;transition:border-color .12s,transform .12s}
.cov:hover,.cov:focus-visible{border-color:var(--accent);transform:translateY(-1px);outline:none}
.cov img{width:100%;height:100%;object-fit:cover;display:block}
.cov-none{font-size:.7rem;color:var(--mut);text-align:center;padding:.2rem}

/* Signing out is a POST, so the control is a button rather than a link: SameSite=Lax sends
   the session cookie on a top-level GET navigation, which made the old link usable from any
   other site. The form itself sits at the end of the page and the button reaches it by id,
   because a <form> implicitly closes an open <p>. Styled to stay the plain text link it has
   always looked like. */
.linkish{background:none;border:0;padding:0;font:inherit;color:inherit;
         text-decoration:underline;cursor:pointer}
.linkish:hover{opacity:.75}

/* Pricing straw poll. Each storage tier shows its monthly and yearly price side by side,
   because the comparison IS the question being asked. Stacks on a phone. */
.wide-intro{max-width:46rem}
.vtier{max-width:46rem;margin:1.5rem 0}
.vtitle{font-size:1.05rem;margin:0 0 .5rem;opacity:.75;font-weight:600}
.vpair{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(13rem,1fr))}
.vcard{border:1px solid var(--line,#ddd);border-radius:10px;padding:1.25rem;text-align:center}
.vcard.voted{opacity:.72}
.vprice{font-size:2rem;font-weight:600;line-height:1}
.vper{font-size:.9rem;font-weight:400;opacity:.65}
.vyear{margin-top:.35rem;min-height:2.4em}
.vbtns{display:flex;gap:.5rem;justify-content:center;margin-top:1rem}
.vbtns .btn{flex:1;max-width:7rem}
.vyes{background:#1d7a44;border-color:#1d7a44;color:#fff}
.vno{background:transparent}
.vdone{margin-top:1rem;font-size:.9rem}

/* ------------------------------------------------ account / feedback columns
   Settings (or guidance) on the left, the panel that is not a setting on the right. The
   right column is sticky so the plan stays in view while the left column scrolls, and the
   whole thing collapses to one column before the columns get too narrow to read - 20rem of
   aside plus a form is already tight at 62rem. */
.awrap{display:grid;grid-template-columns:minmax(0,1fr) 21rem;gap:1.5rem;align-items:start;
       max-width:62rem}
.amain{min-width:0}
.aside{position:sticky;top:1rem;min-width:0}
.aside .card.wide{max-width:none;margin-bottom:1.25rem}
/* The second sticky column: PayPal, beside the plan rather than under it.
   Fixed widths rather than fractions so the main column absorbs every extra pixel - a
   settings form stretched to 60rem is harder to read than one that stops.
   It is NEVER display:none at any width. The card carries the Verify button, which is the
   only way to switch selling on; hiding it on a narrow screen would make the feature
   unreachable rather than merely cramped. Where there is no room for a third column it
   wraps under the plan, which is the old stacked layout. */
.aside-2{position:sticky;top:1rem;min-width:0;margin-top:1.25rem}
@media (min-width:90rem){
  /* The cap has to rise with the column count or the third one has nowhere to go: .awrap is
     62rem, which is a main column plus one 21rem aside, and a second aside needs its width
     and the gap on top of that. Raised only for the two-aside page, so every other .awrap
     keeps the reading width it was given. */
  .awrap:has(.aside-2){grid-template-columns:minmax(0,1fr) 21rem 21rem;max-width:85rem}
  .aside-2{margin-top:0}
}
@media (max-width:1000px){
  .awrap{grid-template-columns:1fr}
  .aside{position:static}
}

/* ------------------------------------------------------------ your plan */
.planbox .plan-name{font-size:1.5rem;font-weight:600;margin:0 0 .15rem}
.billing{margin:.9rem 0 0;padding:.7rem 0 0;border-top:1px solid var(--line)}
.billing .fine{margin:0 0 .5rem}
.billing form{margin:0 0 .4rem}
.billing form:last-child{margin-bottom:0}
.billing .btn{width:100%;text-align:center}
/* The PayPal line: mark and sentence on one baseline, in the panel and in the dialog.
   align-items:start so a sentence that wraps to two lines keeps the mark beside the first,
   not floating in the middle of the block. */
.paypal-note{display:flex;gap:.55rem;align-items:flex-start;margin:.9rem 0 0;
  font-size:.82rem;line-height:1.45;color:var(--mut)}
.paypal-note .ppmark{flex:0 0 auto;margin-top:.05rem}
.paypal-note b{color:var(--fg);font-weight:600}
.dlg-body .paypal-note{margin:0 0 .9rem}
.plan-act{margin:1.1rem 0 0}
.plan-act .btn{width:100%;text-align:center}
/* The bar is the part that communicates. A figure alone does not tell anyone they are
   nearly out of room, which is the only thing this panel exists to say. */
.meter{background:var(--tint);border-radius:999px;height:.55rem;overflow:hidden;margin:1rem 0 .4rem}
.meter i{display:block;height:100%;background:var(--accent);transition:width .2s}
.meter-full i{background:var(--err)}

/* Plans dialog: storage on the left of each row, both prices on the right. */
.prows{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:10px;
       overflow:hidden}
.prow{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
      padding:.85rem 1rem;border-bottom:1px solid var(--line)}
.prow:last-child{border-bottom:0}
.prow-on{background:var(--tint)}
.prow-s{font-weight:600}
.prow-prices{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.prow-p{font-size:1.05rem;white-space:nowrap}
.vfree{font-size:1.6rem}

/* Studio's heading inside the dialog. Spaced to read as a break between two price lists
   rather than a label on the one above it. */
.prows-h{margin:1.4rem 0 .25rem;font-size:1rem}
.prows-sub{margin:0 0 .6rem}
/* Several notes on a row - the listing cap and the yearly saving - need to be told apart
   from each other and from the storage they sit beside. */
.prow-s .fine{display:block;font-weight:400}

/* ---------------------------------------------------------- PayPal buttons

   PayPal's own gold, because the point of it is that it is already familiar: a person who
   has never read a word of this dialog has pressed this button on other sites and knows
   where it goes. That is the whole argument for not styling it like the rest of the site,
   and it is why the hover is PayPal's darker gold rather than our accent.

   #FFC439 with #003087 on it is about 7:1, so it passes without help. Both are literals
   rather than theme variables on purpose: these two are PayPal's, not ours, and the day
   this interface grows a dark mode they must not invert with everything else - a brand
   button that changes colour stops being the button people recognise. */
.btn.pp-btn{display:inline-flex;align-items:center;gap:.5rem;white-space:nowrap;
        background:#FFC439;color:#003087;border:1px solid #E8AE2B;border-radius:999px;
        padding:.4rem .85rem;font-weight:600;cursor:pointer;
        transition:background .15s,box-shadow .15s}
.btn.pp-btn:hover{background:#F2BA36}
.btn.pp-btn:active{background:#E8AE2B}
/* Focus in PayPal's dark blue, not the site accent: on gold, our blue is nearly invisible. */
.btn.pp-btn:focus-visible{outline:2px solid #003087;outline-offset:2px}
.pp-price{font-variant-numeric:tabular-nums}
.pp-price .vper{font-weight:500;opacity:.8}

/* The lockup: monogram then name, set tight enough to read as one mark rather than an icon
   with a word after it. The name is text so it scales with the button. */
.pplock{display:inline-flex;align-items:center;gap:.28rem}
.pplock .ppmark{width:15px;height:14px;flex:0 0 auto}
.ppword{font-weight:700;letter-spacing:-.02em;font-style:italic}
.ppword b{color:#003087;font-weight:700}
.ppword i{color:#009cde;font-style:italic;font-weight:700}

/* Narrow screens: the two cadences stack, and a half-width gold pill looks broken. */
@media (max-width:30rem){
  .prow{flex-direction:column;align-items:stretch}
  .prow-prices{flex-direction:column;align-items:stretch}
  .prow-buy{width:100%}
  .btn.pp-btn{width:100%;justify-content:center}
}

/* ------------------------------------------------------------- feedback */
.fb-input{width:100%;border:1px solid var(--line);border-radius:9px;padding:.65rem .7rem;
          font:inherit;background:var(--panel);color:var(--fg);resize:vertical;min-height:9rem}
.fb-input:focus{outline:2px solid var(--accent);outline-offset:-2px}
.fb-list{list-style:none;padding:0;margin:.5rem 0 0;display:flex;flex-direction:column;gap:.6rem}
.fb-item{border-bottom:1px solid var(--line);padding-bottom:.6rem}
.fb-item:last-child{border-bottom:0}
/* Somebody else's typing, shown back to them: it keeps the line breaks they made, and a
   long unbroken paste must not push the card wider than its column. */
.fb-text{margin:.2rem 0 0;font-size:.93rem;white-space:pre-wrap;overflow-wrap:anywhere}
/* The Snaps email address, directly under the web address it is derived from - they are one
   name and the layout should not suggest otherwise. */
.addrmail{font-size:1rem;font-weight:600;margin:0 0 .5rem;color:var(--mut);word-break:break-all}

/* ------------------------------------------------------------ admin area
   Tabs left, the selected list right - the same two-column frame the account page uses, so
   there is one layout to maintain rather than two that drift. */
.awrap.admin{grid-template-columns:15rem minmax(0,1fr);max-width:72rem}
.atabwrap{padding-top:.2rem}
.atabs{display:flex;flex-direction:column;gap:.4rem}
.atab{display:flex;flex-direction:column;gap:.1rem;position:relative;padding:.7rem .9rem;
      border:1px solid var(--line);border-radius:10px;text-decoration:none;color:var(--fg);
      background:var(--panel)}
.atab:hover{background:var(--tint)}
.atab.on{border-color:var(--accent);background:var(--tint)}
.atab-l{font-weight:600;font-size:.95rem}
.badge{position:absolute;top:.6rem;right:.7rem;background:var(--err);color:#fff;
       border-radius:999px;font-size:.7rem;padding:.05rem .45rem;line-height:1.5}

/* A message from outside, which is a whole item rather than a row in a table: there is no
   column worth aligning when the body is the content. */
.msg-card{border:1px solid var(--line);border-radius:12px;padding:1rem 1.2rem;
          margin-bottom:.9rem;background:var(--panel)}
.msg-card.fresh{border-color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}
.msg-head{display:flex;flex-wrap:wrap;gap:.2rem .8rem;align-items:baseline}
.msg-who{font-weight:600}
.msg-when{margin-left:auto}
.msg-subj{margin:.5rem 0 0;font-weight:600}
.msg-body{margin:.4rem 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.93rem}
.msg-act{margin:.9rem 0 0;display:flex;gap:.5rem;flex-wrap:wrap}

.threads{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;
         overflow:hidden;background:var(--panel)}
.thread-row{display:grid;grid-template-columns:13rem minmax(0,1fr) auto;gap:.9rem;
            align-items:baseline;padding:.85rem 1rem;border-bottom:1px solid var(--line);
            text-decoration:none;color:var(--fg)}
.thread-row:last-child{border-bottom:0}
.thread-row:hover{background:var(--tint)}
.thread-row.fresh{box-shadow:inset 3px 0 0 var(--accent)}
.thread-who{display:flex;flex-direction:column;font-weight:600;min-width:0}
.thread-peek{color:var(--mut);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thread-meta{white-space:nowrap}
.dot{color:var(--accent)}
@media (max-width:860px){
  .awrap.admin{grid-template-columns:1fr}
  .atabs{flex-direction:row;flex-wrap:wrap}
  .thread-row{grid-template-columns:1fr}
  .thread-peek{white-space:normal}
}

/* ------------------------------------------------- the conversation, both sides
   Left is the other person, right is you - the convention every messaging interface uses,
   so it needs no legend. Same component in the admin area and on the photographer's own
   page, which is what keeps the two sides of one thread looking like one thread. */
.convo{display:flex;flex-direction:column;gap:.7rem;margin:1rem 0}
.bubble{max-width:min(85%,34rem);border:1px solid var(--line);border-radius:12px;
        padding:.7rem .9rem;background:var(--tint)}
.bubble.mine{align-self:flex-end;background:#e8f0fe;border-color:#c6dafc}
.bubble-body{margin:0 0 .3rem;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.94rem}
.thread.fresh{border-color:var(--accent)}
.newmark{margin:0;font-size:.78rem;font-weight:600;color:var(--accent);letter-spacing:.02em}
.fb-input.short{min-height:4.5rem}

/* A count beside a navigation item. Not colour alone: the number IS the signal, so it still
   says what it means to someone who cannot tell the red from the grey. */
.nav{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.navcount{background:var(--err);color:#fff;border-radius:999px;font-size:.72rem;
          line-height:1.5;padding:.05rem .45rem;font-weight:600;flex:0 0 auto}
.nav.on .navcount{background:var(--accent)}

/* ------------------------------------------------- gallery page actions
   Above the list rather than after it: with twenty galleries the only control that creates
   one was a scroll away from the page that offers it. */
.gactions{display:flex;gap:.6rem;flex-wrap:wrap;margin:0 0 1.2rem}

/* ----------------------------------------------- the share email template
   Framed like a message, because that is what it is: the editable ends and the locked
   middle sit in one box so the photographer reads it as a whole rather than as three
   separate form fields that happen to be near each other. */
.dlg-box.wide-dlg{max-width:42rem}
.mailframe{display:flex;flex-direction:column;gap:1rem;border:1px solid var(--line);
           border-radius:12px;padding:1.1rem;background:var(--panel)}
.mailsubj{margin:0;font-weight:600;overflow-wrap:anywhere}
.lockmark{display:inline-block;font-size:.72rem;font-weight:600;letter-spacing:.03em;
          color:var(--mut);background:var(--tint);border-radius:999px;padding:.05rem .5rem;
          margin-right:.5rem;vertical-align:middle}
/* Visibly not a field. The tinted panel and the dashed edge say "assembled for you" without
   a sentence having to, which matters because the one thing that must not happen is
   somebody retyping a link by hand into the opening. */
.locked{border:1px dashed var(--line);border-radius:10px;padding:.8rem .9rem;
        background:var(--tint);display:flex;flex-direction:column;gap:.5rem}
.mailpre{margin:0;font:inherit;font-size:.9rem;white-space:pre-wrap;overflow-wrap:anywhere}
.mailpre.full{background:var(--tint);border-radius:10px;padding:.8rem .9rem;margin:.6rem 0 0}

/* An email button: the envelope in the button's own ink, so it reads as part of the label
   rather than as somebody else's logo sitting next to it. */
.mailbtn{display:inline-flex;align-items:center;gap:.5rem}
.mailbtn svg{width:19px;height:19px;flex:0 0 auto}

/* --------------------------------------------------------------- the inbox
   Senders collapse, messages expand. Built on <details>, so it needs no JavaScript, keeps
   its own open state and is reachable by keyboard without anything being wired up. */
.senders{display:flex;flex-direction:column;gap:.6rem;max-width:58rem}

/*
 * Sender and conversation share one summary layout, and it is FLEX rather than grid.
 *
 * It was grid, with the open/closed arrow drawn as ::before - and a pseudo-element inside a
 * grid container is a GRID ITEM. The arrow silently took the first column, pushed every
 * other cell one along, and spilled the last one onto an implicit second row, which on
 * screen reads as text written over text. Flex has no such trap: the marker is one more
 * item in the row, and `min-width:0` on the stretchy cell is what lets it ellipsis rather
 * than shove its neighbours.
 */
.sender,.thread{border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.sender{overflow:hidden}
.sender.fresh,.thread.fresh{border-color:var(--accent)}
.sender>summary,.thread>summary{display:flex;align-items:baseline;gap:.75rem;
  padding:.8rem 1rem;cursor:pointer;list-style:none}
.sender>summary::-webkit-details-marker,.thread>summary::-webkit-details-marker{display:none}
.sender>summary:hover,.thread>summary:hover{background:var(--tint)}
.tw-mark{flex:0 0 .8rem;color:var(--mut);line-height:1}
.tw-mark::before{content:'▸'}
details[open]>summary>.tw-mark::before{content:'▾'}

.sender-who{display:flex;flex-direction:column;min-width:0;font-weight:600;flex:1 1 auto}
.sender-meta{flex:0 0 auto;white-space:nowrap;display:flex;align-items:center;gap:.4rem}
.sender-body{padding:0 .9rem .9rem;display:flex;flex-direction:column;gap:.6rem}

.tw-subj{font-weight:600;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.tw-peek{flex:1 1 6rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tw-meta{flex:0 0 auto;white-space:nowrap;display:flex;align-items:center;gap:.4rem}
.thread-body{padding:0 .9rem .9rem;display:flex;flex-direction:column;gap:.7rem}

.mail{border-top:1px solid var(--line);padding-top:.9rem}
.mail.fresh .mail-subj::after{content:'new';margin-left:.5rem;font-size:.68rem;font-weight:600;
  color:#fff;background:var(--accent);border-radius:999px;padding:.05rem .45rem;vertical-align:middle}
.mail-head{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;align-items:baseline}
.mail-subj{font-weight:600}
/* A stranger's words, kept exactly as written and never interpreted. pre+wrap preserves the
   line breaks they made without letting a long paste widen the page. */
.mail-body{margin:.5rem 0 0;font:inherit;font-size:.93rem;white-space:pre-wrap;
  overflow-wrap:anywhere;background:var(--tint);border-radius:10px;padding:.75rem .9rem}
.mail-del{margin-top:.6rem;display:inline-block}
.replybox>summary{display:inline-block;list-style:none}
.replybox>summary::-webkit-details-marker{display:none}

@media (max-width:760px){
  .sender>summary,.thread>summary{flex-wrap:wrap}
  .tw-peek{flex-basis:100%;white-space:normal}
}

/* The removed-attachment notice. Deliberately loud: the reader has to know something is
   missing and that the sender did not forget it. */
.attn{display:flex;gap:.5rem;align-items:flex-start;margin:.6rem 0 0;font-size:.84rem;
  background:#fef7e0;border:1px solid #f3d99b;border-radius:9px;padding:.55rem .7rem;
  color:#6b5200}
.attn-mark{flex:0 0 auto}

/* Write-an-email, collapsed until wanted. The summary is styled as the button it behaves
   like, so the page does not grow a form nobody asked to see. */
.compose{max-width:40rem}
.compose>summary{list-style:none;cursor:pointer}
.compose>summary::-webkit-details-marker{display:none}
.compose[open]>summary{margin-bottom:.5rem}
.mail-acts{display:flex;gap:.5rem;flex-wrap:wrap;align-items:flex-start;margin-top:.7rem}
.mail-acts .replybox{flex:0 0 auto}
.mail-acts .replybox[open]{flex:1 1 100%}
.mail-acts .subform{max-width:34rem}

/* Your own sent message, on the right, in the same ink as a sent bubble elsewhere. */
.mail.sent{background:#e8f0fe;border:1px solid #c6dafc;border-radius:12px;padding:.7rem .9rem;
  margin-left:auto;max-width:min(90%,38rem);border-top:1px solid #c6dafc}
.mail.sent .mail-body{background:transparent;padding:0}
.convreply{border-top:1px solid var(--line);padding-top:.9rem;margin-top:.3rem}

/* Gallery status, above the settings: whether it is open, and whether the client has
   finished choosing. Both are states somebody else is waiting on. */
.gstate{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin:0 0 .9rem}
.chosen-box{border-color:var(--ok)}
.chosen-line{margin:0 0 .3rem}
.chosen-note{margin:0 0 .6rem;font-style:italic;overflow-wrap:anywhere}
.warnish{color:#8a6100}
/* A photograph the client picked. Top-right so it never sits under the Cover flag. */
.pick-flag{position:absolute;right:.4rem;top:.4rem;background:#b3261e;color:#fff;
  font-size:.7rem;padding:.1rem .4rem;border-radius:999px;line-height:1.4}

/* The Status feed. Everything at full length: these are short, and a client's note is the
   part that could not have been guessed. */
.notices{display:flex;flex-direction:column;gap:.7rem;max-width:52rem}
.notice{border:1px solid var(--line);border-radius:12px;padding:.9rem 1.1rem;background:var(--panel)}
.notice.fresh{border-color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}
.notice-head{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;align-items:baseline}
.notice-title{font-weight:600}
.notice-body{margin:.5rem 0 0;font:inherit;font-size:.93rem;white-space:pre-wrap;
  overflow-wrap:anywhere}
.notice-act{margin:.8rem 0 0}
.gactions .navcount{margin-left:.45rem}

/* What the client marked, on the photograph itself. Stacked under the chosen heart so three
   marks on one picture do not sit on top of each other. */
.mk-flag{position:absolute;right:.4rem;font-size:.7rem;padding:.1rem .4rem;border-radius:999px;
  line-height:1.4;color:#fff}
.pub-flag{top:.4rem;background:#b7791f}
.out-flag{top:1.9rem;background:#5f6368}
/* Money is green, and it is the one of these a photographer is scanning the grid FOR. */
.buy-flag{top:3.4rem;background:#2f8a4c}
.ptile .pick-flag ~ .pub-flag{top:1.9rem}
.ptile .pick-flag ~ .out-flag{top:3.4rem}
/*
 * The badges stack down the corner and each one that appears pushes the rest along, so the
 * offsets are written per combination rather than computed - there is no CSS that says "the
 * nth visible sibling". Four flags is fifteen combinations; these are the ones that move the
 * dollar sign, which is the only new badge here.
 */
.ptile .pub-flag ~ .buy-flag,
.ptile .out-flag ~ .buy-flag{top:3.4rem}
.ptile .pub-flag ~ .out-flag ~ .buy-flag{top:4.9rem}
.ptile .pick-flag ~ .pub-flag ~ .buy-flag,
.ptile .pick-flag ~ .out-flag ~ .buy-flag{top:4.9rem}
.ptile .pick-flag ~ .pub-flag ~ .out-flag ~ .buy-flag{top:6.4rem}
.inline-flag{display:inline-block;min-width:1.2rem;text-align:center;border-radius:999px;
  color:#fff;padding:0 .3rem;margin-right:.3rem}
.marks-box{border-color:#b7791f}

/* ------------------------------------------------- sub-galleries */
.ptile[draggable="true"]{cursor:grab}
.ptile.dragging{opacity:.4}
.ptile.move-failed{outline:2px solid var(--err);outline-offset:-2px}

/* Sub-gallery colours. The stylesheet owns what each palette name looks like, so a stored
   value can never be an illegible choice somebody made once - and since the picker went,
   these are only ever assigned in order by findOrCreate. */
.sec-rose{--sc:#d14d72} .sec-amber{--sc:#c98a16} .sec-green{--sc:#2f8a4c}
.sec-blue{--sc:#2a6fd6} .sec-violet{--sc:#7a4fd1} .sec-teal{--sc:#17857f}
.sec-brown{--sc:#8a6240} .sec-slate{--sc:#5f6368}
/* On the photograph itself: a bar down the left edge, which reads at a glance in a grid and
   does not cover any of the picture. */
.ptile.in-sec::after{content:'';position:absolute;left:0;top:0;bottom:0;width:5px;
  background:var(--sc);border-radius:9px 0 0 9px}
.twoup{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}
.twoup input{width:100%}

/* Activity filters. A row that wraps rather than a grid, so four controls of different
   natural widths sit together on a wide screen and stack cleanly on a narrow one. */
.filters{display:flex;flex-wrap:wrap;gap:.7rem;align-items:flex-end;margin:0 0 1rem}
.filters .f{gap:.2rem}
.filters input{font:inherit;font-size:.88rem;padding:.4rem .5rem;
  border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--fg)}
.filters select{max-width:14rem;font-size:.88rem;padding:.4rem 1.6rem .4rem .5rem;
  background-position:right .5rem center}
.filter-act{display:flex;gap:.4rem;align-items:center}
/* While a filtered list is on its way. Dimmed rather than emptied, so the page does not jump
   about as rows are replaced. */
/* The whole swapped block dims, not just the rows: the pager is replaced with them and would
   otherwise sit at full strength under a list that is visibly mid-change. */
/* Where the Save button was. The word sits in its place rather than appearing somewhere else,
   so the answer to "did that save" is in the spot the question used to be asked. */
.gsave{display:flex;align-items:center;gap:.6rem;min-height:2.2rem}
.saved{font-size:.86rem;color:var(--mut)}
.saved.ok{color:#1b873f}
.saved.err{color:#b3261e}

#activity-list.busy{opacity:.5}
/* Newer / Older, with the position between them. Disabled at either end rather than removed,
   so the pair does not jump sideways as it is used. */
.pager{display:flex;align-items:center;justify-content:center;gap:.9rem;margin:.9rem 0 .2rem}
.pg{display:inline-flex;align-items:center;padding:.35rem .8rem;border:1px solid var(--line);
    border-radius:999px;font-size:.88rem;text-decoration:none;color:var(--fg);background:var(--panel)}
.pg:hover{background:var(--tint)}
.pg.off{color:var(--line);background:transparent;cursor:not-allowed}
.pg-at{white-space:nowrap}

/* Sortable headings. The arrow only appears on the column actually sorted, so the header row
   does not look like six controls all claiming to be active. */
.tbl th.sortable{cursor:pointer;user-select:none}
.tbl th.sortable:hover{color:var(--fg)}
.tbl th.sortable::after{content:'';margin-left:.35rem;color:var(--mut);font-size:.8em}
.tbl th[aria-sort="ascending"]::after{content:'▲'}
.tbl th[aria-sort="descending"]::after{content:'▼'}
.tbl th.sortable:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}

/* The filter row sits under the headings, one control per column. Smaller than the controls
   elsewhere on purpose: eight of them across a table should read as part of the header rather
   than as a form bolted on top of it. */
.tbl .filterrow th{padding-top:.2rem;padding-bottom:.6rem;font-weight:400}
/* No min-width: eight controls each demanding 5.5rem added up to more than the table had, so
   the table outgrew its column and the wrapper started scrolling sideways. They shrink with
   their own columns instead; a select is still readable at its own text's width. */
.tbl .filterrow input{width:100%;min-width:0;font:inherit;
  font-size:.8rem;padding:.3rem .35rem;border:1px solid var(--line);border-radius:8px;
  background:var(--panel);color:var(--fg)}
.tbl .filterrow select{width:100%;min-width:0;font-size:.8rem;border-radius:8px;
  padding:.3rem 1.25rem .3rem .35rem;background-position:right .35rem center;
  background-size:8px 5px}
.tbl .filterrow input:focus,.tbl .filterrow select:focus{outline:2px solid var(--accent);
  outline-offset:-2px}

/* ------------------------------------------- the deletion countdown interstitial */
/* Centred and alone: it is the only thing on the page because it is the only thing
   the account can do. */
.gate{display:flex;justify-content:center;padding:2rem 0}
.gate-box{max-width:34rem;text-align:center}
.gate-box h1{margin-bottom:1rem}
.gate-count{font-size:2rem;font-weight:600;margin:.5rem 0 1rem;letter-spacing:-.02em}
.gate-count.urgent{color:var(--err)}
.gate-box .fine{text-align:left}
.gate-acts{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:center;
           margin:1.5rem 0 1rem}
.gate-acts form{margin:0}

/* --------------------------------------------------------- the apex */
.landing h1{font-size:1.9rem;margin:0 0 .15rem}
/* The apex lockup. A max-width as well as a height so it cannot outgrow the card it sits
   in on a phone; whichever limit bites first, the aspect ratio is held by `height:auto`. */
.landing h1{line-height:0}
.wordmark{display:block;height:84px;width:auto;max-width:100%}
.landing p{margin:.9rem 0}
.landing .fine{margin:0 0 1.4rem}
.landing-act{margin:1.6rem 0 0}
.landing-act .btn{width:100%;text-align:center}

/* ------------------------------------------------- a photograph that is for sale
   The flag is always on a listed tile; the form only where the gate allows one more.
   Both sit at the bottom so they never cover the part of the picture being judged. */
.sale-flag{position:absolute;left:.35rem;bottom:.35rem;z-index:2;
  background:#1b873f;color:#fff;font-size:.72rem;font-weight:700;
  padding:.1rem .4rem;border-radius:999px;letter-spacing:.01em}
/* Blurred, said in a word. The picture in the grid is the photographer's own copy and is
   never blurred - they would otherwise have no way to see what they had locked - so the
   state has to be written rather than shown. */
.lock-flag{position:absolute;right:.35rem;bottom:.35rem;z-index:2;background:#2d3748;
  color:#e2e8f0;font-size:.68rem;padding:.1rem .4rem;border-radius:999px}

/* ------------------------------------------------- the price and the lock, on the tile
   A strip along the bottom of a photograph, out of the way until it is wanted: up on hover
   or focus, and up permanently on anything that has something to say - for sale, or locked.
   A grid of four hundred squares is a grid of photographs first.

   On a touch screen there is no hover to reveal it with, so it is simply always up. */
.tsell{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;align-items:center;
  gap:.3rem;padding:.25rem .3rem;background:rgba(17,17,17,.76);
  opacity:0;transition:opacity .12s ease;pointer-events:none}
.ptile:hover .tsell,.ptile:focus-within .tsell,
.ptile.for-sale .tsell,.ptile.is-blurred .tsell{opacity:1;pointer-events:auto}
@media (hover:none){.tsell{opacity:1;pointer-events:auto}}
.tsell form{display:flex;align-items:center;gap:.25rem;margin:0}
.tsell .sellp{background:rgba(255,255,255,.96);padding:0 .3rem;border-color:transparent}
.tsell .sellp input{width:2.9rem;font-size:.74rem;padding:.12rem 0}
.tsell .btn.small{padding:.12rem .4rem;font-size:.7rem;line-height:1.3}
.tsell .chk{margin-left:auto;font-size:.7rem;white-space:nowrap}
.tsell .chk span{color:#f1f1f1}
/* The bar covers the price flag and the counter while it is up, which is correct: the field
   under your cursor is the better answer to "what does this cost". */
.ptile:hover .sale-flag,.ptile:focus-within .sale-flag,
.ptile:hover .lock-flag,.ptile:focus-within .lock-flag{opacity:0}

/* What just happened, beside the thing it happened to. A notice clears itself; a refusal
   stays until it is acted on. */
.tsay{position:absolute;left:0;right:0;bottom:0;z-index:4;margin:0;padding:.3rem .4rem;
  background:rgba(17,17,17,.92);color:#f1f1f1;font-size:.72rem;line-height:1.35}
.tsay.bad{background:#7f1d1d;color:#fee2e2}
/* On the Single photos card the tile is a column with the link under it, so the message
   belongs under that rather than over the picture. */
.ptile.single .tsay{position:static;background:var(--tint);color:var(--fg);border-radius:0 0 12px 12px}
.ptile.single .tsay.bad{background:#fde8e6;color:var(--err)}

/* My PayPal account, in the 21rem column under the plan. */
.ppcard .subform{margin:.7rem 0 .6rem}
.ppcard input[type=email]{width:100%;border:1px solid var(--line);border-radius:8px;
  padding:.45rem .55rem;font:inherit;font-size:.9rem;background:var(--panel);color:var(--fg)}
.ppcount{margin:.6rem 0 .5rem;font-size:.95rem}
.ppcount b{font-size:1.15rem}
.ppok,.ppbad{margin:.5rem 0;padding:.4rem .55rem;border-radius:8px;font-size:.84rem;
  line-height:1.4}
.ppok{background:#e8f5ec;color:#11612c}
.ppbad{background:#fdeceb;color:#8c1d18}
.ppok .fine,.ppbad .fine{color:inherit;opacity:.8}

/* The PayPal address: shown, with a pencil, until somebody asks to change it. */
.ppedit{margin:.6rem 0}
.ppedit>summary{display:flex;align-items:center;gap:.4rem;cursor:pointer;list-style:none;
  border:1px solid var(--line);border-radius:8px;padding:.45rem .55rem;font-size:.88rem}
.ppedit>summary::-webkit-details-marker{display:none}
.ppedit>summary:hover{background:var(--tint)}
.ppaddr{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;min-width:0}
.ppaddr.none{color:var(--mut)}
.pppen{flex:0 0 auto;color:var(--mut);font-size:.95rem}
.ppedit[open]>summary{border-bottom-left-radius:0;border-bottom-right-radius:0}
.ppedit .subform{border:1px solid var(--line);border-top:0;border-radius:0 0 8px 8px;
  padding:.6rem .55rem;margin:0}
/* Visually hidden but read aloud: the pencil is a glyph, and "✎" is not a label. */
/* ---------------------------------------------------------------- language flags
   Above Sign out, in the corner where a language switch is looked for. Small, quiet and
   always in the same place: this is a control somebody uses once and then wants to stop
   seeing, so it is sized for recognition rather than for attention.

   THE FLAGS ARE DRAWN HERE, NOT TYPED AS EMOJI. They were emoji until 2026-10-28, on the
   reasoning that a system font draws one in colour at any size and five image files is five
   things to serve, cache and get wrong. That is true of every platform except the one most
   people use: WINDOWS HAS NO FLAG GLYPHS AT ALL. Segoe UI Emoji omits the regional-indicator
   pairs on purpose - Microsoft's own neutrality decision about disputed borders - so Edge and
   Chrome on Windows fall back to drawing the two letters, and the bar read "GB DE LV RU UA".
   Firefox was fine, because it ships Twemoji rather than trusting the OS, which is what made
   the bug easy to miss.

   So they are SVG, inlined as data: URIs, keyed off the lang attribute the markup already
   carries. That keeps the promise the emoji made - nothing extra to request, one cached
   stylesheet, no third-party asset - while drawing the same picture everywhere. About 1.8 KB
   once; every page stays exactly the size it was.

   Sized in rem and not font-size now, because a background is a box rather than a character. */
.langbar{display:flex;align-items:center;gap:.15rem;justify-self:end}
.lang{display:inline-flex;align-items:center;justify-content:center;width:1.9rem;height:1.6rem;
  padding:0;border:1px solid transparent;border-radius:6px;background:none;cursor:pointer;
  line-height:1;opacity:.55;transition:opacity .12s,border-color .12s}
.lang:hover,.lang:focus-visible{opacity:1;border-color:var(--line);outline:none}
/* The 1px inset ring is what keeps a white-topped flag - Russia - from dissolving into a
   pale background instead of reading as a flag. */
.flag{display:block;width:1.25rem;height:.9rem;border-radius:2px;
  background-size:100% 100%;background-repeat:no-repeat;
  box-shadow:0 0 0 1px rgba(0,0,0,.18) inset}
/* The one in use is a span, not a button - there is nothing to press - so it is marked by
   being the only one at full strength with a line under it. */
.lang.on{opacity:1;cursor:default;border-color:transparent;
  box-shadow:inset 0 -2px 0 0 var(--accent)}
@media (max-width:620px){ .langbar{gap:0} .lang{width:1.6rem} .flag{width:1.1rem;height:.8rem} }

/* GENERATED: one rule per language, viewBox 0 0 60 30. Union Jack in its compact
   construction; the rest are plain bands, Latvia's at 2:1:2 rather than equal thirds. */
.lang[lang="en"] .flag{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='a'%3E%3Cpath d='M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z'/%3E%3C/clipPath%3E%3Crect width='60' height='30' fill='%23012169'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' clip-path='url(%23a)' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E")}
.lang[lang="de"] .flag{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Crect y='0' width='60' height='10' fill='%23000000'/%3E%3Crect y='10' width='60' height='10' fill='%23DD0000'/%3E%3Crect y='20' width='60' height='10' fill='%23FFCE00'/%3E%3C/svg%3E")}
.lang[lang="lv"] .flag{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Crect y='0' width='60' height='12' fill='%239E3039'/%3E%3Crect y='12' width='60' height='6' fill='%23FFFFFF'/%3E%3Crect y='18' width='60' height='12' fill='%239E3039'/%3E%3C/svg%3E")}
.lang[lang="ru"] .flag{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Crect y='0' width='60' height='10' fill='%23FFFFFF'/%3E%3Crect y='10' width='60' height='10' fill='%230039A6'/%3E%3Crect y='20' width='60' height='10' fill='%23D52B1E'/%3E%3C/svg%3E")}
.lang[lang="uk"] .flag{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Crect y='0' width='60' height='15' fill='%230057B7'/%3E%3Crect y='15' width='60' height='15' fill='%23FFD700'/%3E%3C/svg%3E")}

.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);
  clip-path:inset(50%);white-space:nowrap}

/* The confirmation code: a short box and its button on one line. */
.ppcode{display:flex;gap:.4rem;align-items:flex-end;margin:.6rem 0 0;flex-wrap:wrap}
.ppcode .lbl{flex:1 0 100%}
.ppcode input{width:6.5rem;border:1px solid var(--line);border-radius:8px;padding:.45rem .55rem;
  font:inherit;font-size:1rem;letter-spacing:.18em;text-align:center;
  background:var(--panel);color:var(--fg)}

/* A Merchant ID is copied, not read as prose: monospace so a transposed character shows. */
.ppcard .mono,.ppaddr.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  letter-spacing:.04em}
.ppcard input{width:100%;border:1px solid var(--line);border-radius:8px;padding:.45rem .55rem;
  font:inherit;font-size:.9rem;background:var(--panel);color:var(--fg)}
.ppcard input.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  text-transform:uppercase;letter-spacing:.06em}
.ppcard .lbl{display:block;margin:.5rem 0 .2rem;font-size:.82rem;font-weight:600}

/* The FAQ links on the PayPal card, and the official links inside an FAQ answer. */
.ppfaq{margin:.15rem 0 .5rem}
.faqlinks{margin:.6rem 0 0;display:flex;flex-wrap:wrap;gap:.25rem 1rem;font-size:.86rem}

/* ------------------------------------------------- Selling, in the gallery rail */
.sellpanel .gw-h{margin:.2rem 0 .5rem;font-size:.9rem;font-weight:700}
.sellpanel .gw-h+*{margin-top:0}
.sellpanel h3.gw-h~h3.gw-h{margin-top:1.1rem;padding-top:.9rem;border-top:1px solid var(--line)}
.sellrow{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap;margin:0 0 .45rem}
/*
 * THE CHEVRON HAD NOWHERE TO GO. See the note under `select` at the top of this file: the
 * arrow is drawn on the right-hand PADDING, and this rule narrowed that padding from 1.9rem
 * to .5rem without moving it - so the one dropdown in the product that a photographer uses
 * to choose what to sell did not look like a dropdown at all, it looked like a text field
 * with a smudge over the end of the filename.
 *
 * Room made for it here rather than the arrow taken away, because the whole complaint is
 * that it did not read as a dropdown.
 */
.sellsel{flex:1 1 100%;min-width:0;border:1px solid var(--line);border-radius:8px;
  padding:.4rem 1.7rem .4rem .5rem;font:inherit;font-size:.85rem;
  background-color:var(--panel);color:var(--fg);background-position:right .55rem center}
/* The euro sign sits inside the box so the number is what is typed into, not a field that
   happens to be about money. */
.sellp{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:8px;
  padding:0 .45rem;background:var(--panel)}
.sellp-cur{color:var(--mut);font-size:.85rem}
.sellp input{width:4.2rem;border:0;background:none;font:inherit;font-size:.9rem;
  padding:.4rem .25rem;color:var(--fg)}
.sellp input:focus{outline:none}
.sellp:focus-within{outline:2px solid var(--accent);outline-offset:-1px}
.sellmsg{font-size:.82rem;line-height:1.45;margin:0 0 .5rem}
/* "On sale at €90 as a whole" under the gallery-wide price box. A state, not a control, so
   it is tinted rather than bordered - the eye should find the price and move on. */
.sellnow{background:var(--tint);border-radius:8px;padding:.45rem .55rem;margin:0 0 .5rem}
.selltally{margin-top:.8rem;padding-top:.6rem;border-top:1px solid var(--line)}
.sellpanel button[disabled]{opacity:.45;cursor:not-allowed}
/*
 * FOR SALE IS GREEN. The cover is blue, and these were both blue, so putting a photograph up
 * for sale made it look like it had just become the cover - two unrelated states drawn
 * identically on the same tile.
 *
 * The same green as the price badge sitting in the corner of it, so the frame and the figure
 * inside it are visibly one fact rather than two.
 *
 * A photograph that is BOTH the cover and for sale shows green: an outline can only be one
 * colour, and a cover already says so in words on its own badge, which is the argument the
 * cover styling makes for itself a few rules above.
 */
.ptile.for-sale{outline:3px solid var(--ok);outline-offset:-3px}

/*
 * The photograph the Selling panel is pointed at. DASHED, and never a third solid colour.
 *
 * Solid frames on this tile mean a lasting fact about the photograph - this is the cover,
 * this one is for sale. Where the panel happens to be pointing is neither; it changes on the
 * next click and belongs to the panel rather than to the photograph. Dashes say transient
 * without needing a colour nobody has learned yet.
 */
.ptile.sell-on{outline:3px dashed var(--accent);outline-offset:-3px}
/* Pointed at AND for sale: keep the green, thicken it, so the lasting fact is not overdrawn
   by the passing one. */
.ptile.for-sale.sell-on{outline:4px double var(--ok);outline-offset:-4px}

/* ------------------------------------------------------------------ the Global Market
   Two pages in one block: the photographer's own list on the dashboard (.ptile.market and
   the dialog), and the shop on the apex (.mk*). They share a stylesheet because they share
   a product, and a second file would be a second place for the tile size to drift. */

/* The dashboard's own tiles: just the picture, clicked to open the dialog that manages it.
   A listing wears a green frame and the price it is listed at; nothing else sits on the tile. */
.pgrid.market .ptile{position:relative;cursor:pointer}
.pgrid.market .ptile[data-market-edit]:focus-visible{outline:3px solid var(--accent);
  outline-offset:-3px}
/* No index number under a market grid - it is a shop of its own files, not a numbered list. */
.pgrid.market .ptile::after{content:none}
.ptile.market.on-market{outline:3px solid var(--ok);outline-offset:-3px}
/* The price, over the corner of a listed picture. Green, to read as one thing with the frame. */
.mkbadge{position:absolute;left:.45rem;top:.45rem;background:var(--ok);color:#fff;
  font-weight:600;font-size:.9rem;line-height:1;padding:.28rem .5rem;border-radius:999px;
  box-shadow:0 1px 4px rgba(0,0,0,.35);pointer-events:none}
/* The dialog's management row, under the form. */
.mkmanage{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-top:1rem;
  padding-top:.9rem;border-top:1px solid var(--line)}
.mkmanage .inline{display:inline}

/* A tag, wherever one is drawn. */
.mktag{display:inline-block;background:var(--tint);border:1px solid var(--line);
  border-radius:999px;padding:.08rem .5rem;font-size:.82rem;color:var(--mut);
  text-decoration:none}
a.mktag:hover{background:var(--panel);color:var(--fg)}

/* The listing dialog. */
.mkform-grid{display:flex;gap:1rem;flex-wrap:wrap}
.mkform-pic{flex:0 0 11rem;height:11rem;background:var(--tint);border:1px solid var(--line);
  border-radius:10px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.mkform-pic img{width:100%;height:100%;object-fit:cover}
.mkform-fields{flex:1 1 16rem;min-width:0}
.mkprice-field{display:flex;align-items:stretch;border:1px solid var(--line);
  border-radius:9px;overflow:hidden;background:var(--panel);max-width:12rem}
.mkeur{padding:.55rem .6rem;background:var(--tint);border-right:1px solid var(--line)}
.mkprice-field input{flex:1;min-width:0;border:0;padding:.55rem .6rem;font:inherit}
.mkform .f{display:block;margin:0 0 .9rem}
.mkform input[type=text],.mkform input:not([type]){width:100%}
#market-tags{width:100%;border:1px solid var(--line);border-radius:9px;padding:.55rem .6rem;
  font:inherit}

/* ------------------------------------------------------------- the shop, on the apex */
body.market{background:var(--bg)}
.mkbar{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.mkbrand img{height:2.1rem;width:auto;display:block}
.mktitle{font-weight:600;color:var(--fg);text-decoration:none}
.mktitle:hover{color:var(--accent)}
.mkbar .langbar{margin-left:auto}
.mkmain{max-width:78rem;margin:0 auto;padding:1.5rem 1rem 3rem}
.mkhead{margin:0 0 1.4rem}
.mksearch{display:flex;gap:.5rem;flex-wrap:wrap;margin:.8rem 0}
.mksearch input{flex:1 1 18rem;min-width:0;border:1px solid var(--line);border-radius:9px;
  padding:.65rem .8rem;font:inherit;background:var(--panel)}
.mkpop{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.mkfound{margin:0 0 .8rem}

.mkgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr));gap:1rem}
.mktile{display:block;text-decoration:none;color:inherit;border:1px solid var(--line);
  border-radius:12px;overflow:hidden;background:var(--panel)}
.mktile:hover{border-color:var(--accent)}
.mktile-pic{position:relative;display:block;aspect-ratio:1;background:var(--tint)}
.mktile-pic img,.mktile-pic video{width:100%;height:100%;object-fit:cover;display:block}
.mktile-foot{display:flex;flex-direction:column;gap:.3rem;padding:.55rem .6rem}
.mkprice{font-size:1.05rem}
.mkprice.big{font-size:1.8rem;margin:0 0 .8rem}
.mktags{display:flex;flex-wrap:wrap;gap:.3rem}
.mkempty{color:var(--mut);padding:2rem 0}
.mkmore{margin:1.4rem 0;text-align:center}

.mkback{margin:0 0 .8rem}
.mkitem{display:flex;gap:1.5rem;flex-wrap:wrap;align-items:flex-start}
.mkitem-pic{flex:1 1 28rem;min-width:0;background:var(--tint);border:1px solid var(--line);
  border-radius:12px;overflow:hidden}
.mkitem-pic img,.mkitem-pic video{width:100%;height:auto;display:block}
.mkitem-side{flex:1 1 18rem;min-width:0}
.mktags-all,.mkseller{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.mkfoot{max-width:78rem;margin:0 auto;padding:1rem;border-top:1px solid var(--line);
  color:var(--mut)}

/* ------------------------------------------------------------------ policy pages
   Terms of Service, Privacy Policy, Payment Policy: a top bar with the logo home, and a
   single readable column of prose. See src/policies.js. */
.policy-top{display:flex;align-items:center;padding:.8rem clamp(1rem,4vw,2rem);border-bottom:1px solid var(--line)}
.policy-top img{height:30px;width:auto;display:block}
.policy{max-width:46rem;margin:0 auto;padding:2.5rem clamp(1rem,4vw,2rem) 4rem;line-height:1.65}
.policy h1{margin:0 0 .25rem;font-size:clamp(1.8rem,4vw,2.2rem);letter-spacing:-.02em}
.policy h2{margin:2rem 0 .5rem;font-size:1.15rem}
.policy p{margin:.6rem 0}
.policy ul{margin:.6rem 0;padding-left:1.25rem}
.policy li{margin:.35rem 0}
.policy-updated{color:var(--mut);font-size:.9rem;margin:0 0 1.6rem}
.policy-cross{margin-top:2.5rem;padding-top:1.2rem;border-top:1px solid var(--line);font-size:.9rem}
.policy-cross a{margin-right:1.2rem}
